Is it just me or does KMP badly need to get opinio...
# multiplatform
c
Is it just me or does KMP badly need to get opinionated about how folks integrate it on iOS. At the moment it’s like “it’s up to you, use it directly or use Cocoapods or SPM if you want”. This prevents folks being able to build native integrations easily. Like on Flutter or React Native, there’s no question, everybody uses Cocoapods. So folks can write libs/plugins containing native iOS code, and it all just works. Devs don’t know or care whether the lib they’re importing contains native code. If I wanted to write a native KMP plugin which includes native iOS code, I will need to specify in my installation instructions “you must be using Cocoapods” or similar. This is not ideal. (There is a concern for Flutter and RN that they will find it difficult to move off of Cocoapods because basically ALL plugins are using it. KMP could avoid this by championing SPM early).
👍 1
d
Well, Cocoapods is dead, so that's a dead end. Official SPM integration would be good.
☝️ 9
I'm with you, the wishy-washy iOS/macOS integration is a bad experience.
c
I agree, of course everybody should be migrating away from Cocoapods, and it should be avoided if at all possible for new projects. However in reality I think you’ll find many iOS projects are still using it heavily. And the KMP/Cocoapods integration is nice and makes it easy to use native code from Kotlin. I’ve seen no indication that anybody is particularly concerned about deprecating it.
d
We're going to spin up a new KMP library, and I don't want to commit to CocoaPods, given that I'll have to rejigger the project setup at some point.
h
IMHO the KGP should support Gradles SPM implementation and not recreating SPM support again.
💯 1
f
That’s my job, but an official support should be better with better optimisation for cinterop. Otherwise, it’s not the only tool who need to be official, like a better crash handler.
⬆️ 1
Importing third party dependencies is not the only issue. It’s also using pure swift iOS API who cannot be exported by default.
I tried to answer at these issues
I’ve seen no indication that anybody is particularly concerned about deprecating it.
Wait until next year, when the official communication of the end of cocoapods will start.😄
c
We shall see, usage continues to increase. Anyway IMO KMP should lead the way on this by at least caveatting any Cocoapods recommendation.
It feels like React Native is a long way off migrating from Cocoapods
They have two separate issues: work out technically how to do it, then encourage enough plugin developers to start supporting it (presumably alongside Cocoapods initially) for users to start migrating away from it
😅 1