Hi, I’m trying to build iOS project of my MPP but ...
# multiplatform
o
Hi, I’m trying to build iOS project of my MPP but it fails with this error
Copy code
> Task :app:cinteropFirebaseIos UP-TO-DATE
> Task :app:linkDebugFrameworkIos
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FIRDatabase", referenced from:
      objc-class-ref in combined.o
ld: symbol(s) not found for architecture x86_64
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

> Task :app:linkDebugFrameworkIos FAILED
i
Do you use the CocoaPods plugin?
o
do you mean gradle plugin? no. I specified cocopods in podfile
did not know it exists. reading docs
trying to setup cocopods plugin but it fails
here is my cocopods section
Copy code
cocoapods {
        // Configure fields required by CocoaPods.
        summary = "Some description for a Kotlin/Native module"
        homepage = "Link to a Kotlin/Native module homepage"
        pod ("Firebase")
        pod ("Firebase/Core")
        pod ("Firebase/Database")
    }
and here is my
podfile
Copy code
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'app' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for app

end

target 'iosApp' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for iosApp
  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Database'
  pod 'app', :path => '../app'

  target 'iosAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end
import cocopods.*
does does not work for som reason
unresolved reference cocopods
@ilya.matveev do you have any idea ?
might it be related to the fact it does not support subspecs ?
m
Subspecs are not supported in the Cocoapods plugin for MPP
i
This thread should help to workaround the issue: https://kotlinlang.slack.com/archives/C3SGXARS6/p1556475587073500