Can anybody explain whats the different between kotlin multiplatform and compose multiplatform?
a
Can anybody explain whats the different between kotlin multiplatform and compose multiplatform?
k
Kotlin Multiplatform is technology Compose is UI framework
a
So can i build both android and ios app using KMM and compose multiplatcorm?
k
Compose multiplatform works on top of kmm
c
You can both android and iOS apps using KMM. You can share business logic, networking, data storage, serialization and a whole bunch of non-UI code using KMM. But a mobile app is more than business logic - it needs UI after all. So even if you use KMM to share code, you still need to write UI code. When KMM was initially launched the recommendation was to use native platforms to write the UI (Swift for iOS and Kotlin for Android). What Compose multiplatform does is allow you to also write the common UI using a single framework and programming language: Compose and Kotlin.
k
On the conference there was a link to our sample app. It contains two modules: shared KMM module and common UI module with compose https://github.com/Kotlin/kmm-production-sample/tree/compose-app
a
Wait…. Kotlin Multiplatform isn’t the same as KMM right? The latter is Kotlin Multiplatform Mobile and Desktop isn’t a part of that
k
KMM = Kotlin Multiplatform Mobile. But it doesn't matter. It is just part of technology includes Xcode specific tooling
a
Thanks. I was confused because OP asked about multiplatform without mobile.
m
one thing I love about KMM is the fact you can write native UI code for each platform in case a good UI solution doesn't exist
c
kmm is writing ios and android apps in kotlin, but the ui layer is still native (swiftui) compose multiplatform lets you actually use compose code on other platforms. very different.
r
Guys can we use compose for kmm ? I mean only for ios and android it's possible right