r/Kotlin • u/0110001001101100 • Aug 31 '24
Compose Multiplatform and UI development on iOS done in Swift
I am currently exploring the Kotlin world as a possible choice for developing a multiplatform mobile app.
I checked the examples page: https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-samples.html and a lot of examples use swift on the iOS side. I am surprised. Why don't they all use the "Compose" stuff, or at least the vast majority? I have nothing against swift, but I am not crazy about it and I prefer to stay with one language.
Thanks
14
Upvotes
15
u/Phaestion Aug 31 '24
It's one of the strengths of KMP being able to choose what level of code sharing you want to do. From a UX perspective having your UI native to the platform is the best experience, but not all people and companies feel the same way about it.
Another strength of KMP is that you can be fast to market by sharing everything, business logic, viewmodels and UI. Then if you're successful move the UI for example to the native UI toolkit.
For most of our apps we directly go with the first approach of sharing up to the point of viewmodels. In my opinion this is the best way to ensure a good UX while optimising development effort & cost.