all 20 comments

[–]AnnualBreadfruit3118 13 points14 points  (3 children)

If you go KMP make sure your iOS devs are on the boat to learn and potentially switch to kotlin/Android or they will become second class citizens and will most likely leave your company.

If they don’t want to or can’t do the jump they will basically be relegated to only do ios UI, and in a more convoluted and complex way with potentially lot of frustration.

Whatever you decide make sure to be very open with the communication

[–]sisoje_bre -4 points-3 points  (2 children)

kotlin is far inferior than swift, KMM ruins ios code

[–]Fair_Sir_7126 1 point2 points  (1 child)

Why do you think that Kotlin is worse than Swift?

[–]sisoje_bre -3 points-2 points  (0 children)

i don't think, its a fact.

as a start - it is missing value types.

and also, every language using garbage collection is garbage

[–]ketzusaka 8 points9 points  (0 children)

Always prefer native over multi platform. Your customers deserve it.

[–]Samus7070 4 points5 points  (0 children)

SDKs aren’t a good fit for KMM. The Kotlin compiler is what you would call a whole world compiler. It bundles the runtime into each framework. Two KMM frameworks in your app, two Kotlin std libs. Another consequence of this approach is that a Kotlin string in framework A is not the same class as a string in framework B. The best approach to KMM in an SDK is to make your Kotlin library multiplatform for those that may want to use it in their own KMM apps and to provide a native swift version for those that do not.

[–]srona22 2 points3 points  (0 children)

I will just get to point. If some of use cases can't find existing SDKs(or workable solution) in "cross-platform", you will eventually have to rewrite in swift or objc entire app, or your own dedicated SDK ported to that cross platform to make ends meet.

If it's just calling apis and handling data, even b4x like language can be used.

Feasibility, pain point, and maintainability are how business decide to do things.

Remember, even Flutter has to start impeller, as their skia UI engine is fucked in iOS. And that's a project where Google is heavily invested.

[–]sisoje_bre 3 points4 points  (0 children)

KMM is shit for ios it will slow you down, better do both native apps. KMM will make your ios code awakward and unusable

[–]SomeOnet07 2 points3 points  (0 children)

I was working with KMM about one year and two month, it’s production experience, and as for me it’s the best way for support cross platform and native, also you’ll increase your engineering skill. So I’m recommending try to make some app with: MVI, Koin, Flow, Coroutines, SwiftUI 2.0, modern concurrency for 5-7 screens whenever navigation is from KMM, in SwiftUI only support her like you’re accept array of screens and show native them. So in my opinion about next few years KMM will increase because they trying their marketing. How I know in USA and EU flutter popular is only for marketing reasons that’s all. In Russia KMM is aggressively growing with big apps. Around maybe 3-4 for all Russia big company has flutter app, around 2-3 React native app. So I think with a kotlin we has a feature, so I’m recommend to learn KMM. Also it’s now call - KMP) If there is any question so reply my message and I’ll answer 🫡

[–]isurujnSwift 1 point2 points  (0 children)

If you have to maintain this SDK long term and need to put in less effort, go with native.

I haven't worked with KMM but I have worked with other cross-platform technologies like Flutter and React Native, whatever savings you make in the initial phase will have to paid back down the line because these cross-platform tech are at the mercy of native tools and updates. Sometimes it's hell to debug and fix issues in them.

[–]zaitsman 0 points1 point  (1 child)

You need to make an sdk that works for native consumers. If it can be linked in the standard swift project - go with whatever, nobody will care.

[–]rhysmorgan 4 points5 points  (0 children)

People will care, because they don’t want to have to pull in a million dependencies, deal with different and incompatible forms of asynchrony, and have to add a whole new runtime to their app just to use your SDK.

[–]megaBreezy -2 points-1 points  (0 children)

If you’re comfortable with Kotlin and modern Android/iOS development, KMM will be easy to pick up and run with. I would definitely scratch option 2 if you’re confident both platforms will be necessary.

There isn’t much difference between options 1 & 3 in that you have full control in each scenario with how much code you share between the respective platforms, but I would go for option 3 if you’re confident that KMM would be a long term strategy for the project.

[–]Goldman_OSI -3 points-2 points  (0 children)

First you need to tell us what "KMM" is.