Anyone tried KMM recently, how was your experience...
# multiplatform
k
Anyone tried KMM recently, how was your experience? • How is new memory model? • Has tooling improved? • Has performance on iOS improved? • Where things are lacking currently?
e
not personally, but I believe the water is warm, the main KMM consultancy is defaulting to it so jump on in! Performance-wise, I think the only issue is it still uses stop the world garbage collection on the main thread, but this should be resolved in the next few months as they implement concurrent gc. Your code should Just Work (tm) apart from any objects which straddle the kotlin/objective-c/swift boundary where some concepts aren't the same (e.g. data classes). https://twitter.com/kpgalligan/status/1474101883686068227
k
@Eamon Keane What runtime they talk about in tweet replies, I thought KN compiles to native code, just like Swift code on iOS?
e
no - KMM compiles to an objective-c framework
k
what is runtime then?
that they talk about
e
sorry might not be being precise. The runtimes it uses is showcased here: https://github.com/joreilly/StarWars
k
I do not understand?
e
It is confusing, and I'm clearly not an expert, but have you read these two articles and have specific questions? https://kotlinlang.org/docs/apple-framework.html https://kotlinlang.org/docs/native-objc-interop.html
👍 1
k
GC included to result framework might be called ‘runtime’ because it is additional stuff with your pure code🤔
e
Perhaps there's something you could clarify - are there two garbage collection processes in an iOS KMM app - one in the framework, the other on the iOS side (for pure swift/objective-c objects) as in standalone iOS apps? Or does KMM look after gc for the full app?
👀 1
k
@Konstantin Tskhovrebov @Eamon Keane https://stackoverflow.com/a/63980769/7356355
👍 1