Im now trying to setup my ios project and fill in ...
# multiplatform
j
Im now trying to setup my ios project and fill in the rest of the actuals. in order to accomplish this I have to be able to import some ios dependencies (such as segment) is there a good tutorial somewhere for cocoapods or spm on kmp? I keeep running into issues with gradle not being able to resolve things and AI has been a rabbit hole on this.
j
I've seen it, should i be concerned about hte sunsetting of cocoapods? my current ios project equivalent was using spm, but it seems like cocoapod might have better support right now in kmp?
t
in the current stable releases SPM is not yet supported - there is a 3rd party plugin with brings such a support. In Kotlin 2.4.0 release we are working on SPM support preview (eap what's new)
but cocoapods will stay as supported way for some time
k
I didn't want to use cocoapods, since I haven't used it for a long time in native iOS development. So what I am doing right now is this: • Create an interface in the multiplatform environment • Create a way to access the implementation inside the multiplatform environment (can be a shared var or a factory of some kind) • Then inside Xcode create a class which implements this interface • Then also inside Xcode inside the App init or the AppDelegate set this class for your shared var or implement the factory method to return your custom class. This way you can use SPM and use expect actual. I found this the best way to use 3rd party libraries.