Is it possible to add dependencies with cocoapods ...
# multiplatform
i
Is it possible to add dependencies with cocoapods in Kotlin so they can be use the in apple
sourceSets
but still export the module as a
XCFramework
to Xcode?
👍 1
For example how can you add Firebase so it's accessible in the apple sourceset?
Or how can you add IOS dependencies if exporting the module as a XCFramework? The only option is to use cocoapods but I can't get it to work.
s
To add a cocoa pods dependency you can follow: https://kotlinlang.org/docs/multiplatform-mobile-ios-dependencies.html And to generate an XCFramework from your KMP project you can follow this: https://kotlinlang.org/docs/multiplatform-build-native-binaries.html#build-xcframeworks
l
AFAIK there’s no way to rely on Cocoapods for you Kotlin code and do not expose this dependency to Xcode. That’s is, Cocoapods gradle plugin does only a part of the whole that’s necessary to compile the final artifact for execution on iOS.