Join Slack
Powered by
Is it possible to add dependencies with cocoapods ...
# multiplatform
i
Isak Hansson
08/08/2023, 7:53 PM
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
Isak Hansson
08/08/2023, 7:56 PM
For example how can you add Firebase so it's accessible in the apple sourceset?
Isak Hansson
08/08/2023, 8:03 PM
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
Swapnil Madavi
08/10/2023, 3:21 PM
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
leandro
08/10/2023, 4:21 PM
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.
32
Views
Open in Slack
Previous
Next