https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Marc Planas

12/12/2023, 2:11 PM
Hi guys, i have been playing around with KMP for a few weeks and see all the potential it have. I’m planning to build an startup. And i was wondering how much mature is KMP for going into production. The idea is to have the networking + bussiness logic centralized and then build the UI native. With this architecture i can deploy the app to production for both ? Is it a good idea ? hahaha thank you in advance ❤️
👌 7
j

Jacob Ras

12/12/2023, 2:13 PM
You'd be following the path a lot of companies have walked already, in production 😉
🤯 1
s

Spoudel347

12/12/2023, 2:19 PM
You are just sharing the business logic and it is well stable for it. It is even stable enough for sharing most of the UI. Only thing I’d hold off is things like UI for live camera feed. Even this can be achievable with workaround using native ui element bridge.
m

Marc Planas

12/12/2023, 2:21 PM
i wanted to create a simple Social platform. i could share the UI to ? i think is not to complex
s

Spoudel347

12/12/2023, 2:35 PM
Yeah, you can. I recently rewrote my pet project (sharing 100% of the codebase) just to test the water and it is well stable.
2
p

Pablichjenkov

12/12/2023, 2:38 PM
Unless UI is too complex, I will go with compose multiplatform too. A few companies already doing it
2
b

brandonmcansh

12/12/2023, 2:48 PM
Echo same sentiments. Used it for two projects this far with fully shared UI
1
c

CLOVIS

12/12/2023, 3:17 PM
I've been in production for the past ~3 years with Kotlin/JVM backend and Kotlin/JS frontends. When you figure the build, everything after that is fairly smooth. There are a few rough edges here and there, but no major problems have made it past QA.
r

Raed Ghazal

12/12/2023, 3:17 PM
I would double down on the Ui part as well, I’m working on a side project that uses fully KMP and Compose multiplatform, not done yet but things are going well advice here: try building a very very simple MVP for your project in KMP and CMP (Compose MP) this will help you a lot in overcoming the basic issues and struggles that all of us faced in the beginning, afterwards you will be able to confidently move on with your full project
2
I think the hardest part would be to hire people who know KMP 😅 unless you’re planning to start alone, then hire Android people and teach them KMP in the future, this can be a thing you might as well need a help from an iOS developer in some parts if it required complex iOS specific code
s

Spoudel347

12/12/2023, 3:21 PM
Is it that hard to find KMP developers? Are you involved in any hiring process?
j

Jacob Ras

12/12/2023, 3:28 PM
Finding Android-background KMP developers is super easy. Finding iOS-background KMP developers.. a bit harder 😉
b

brandonmcansh

12/12/2023, 3:32 PM
@Marc Planas if you're looking to bring on assistance more than happy to help and consult in any fashion needed
j

Joel Denke

12/12/2023, 3:44 PM
Just be careful with KMP iOS and it will be fine I think :) Android and desktop stable. Also for future with KMP Wasm ongoing can go cross platform everywhere. I would say also depends what features used. Like JNI and KMP was uhm not so nice in Android NDK. But simple domain logic, BE stuff and such, would say very stable. Can also swing for Compose multiplatform but maybe a little early for iOS. But recent KMP/CMP version 1.5.0+ very nice. For BE can recommend use Apollo Graphql which is KMP supported. Ktor works but will looking forward to have Okio and Okhttp KMP, as well as Coil for image rendering.
👍 1
b

brandonmcansh

12/12/2023, 4:00 PM
im having great success with compose MP with iOS fwiw
1
we also used KMP with native iOS at Gabb Wireless and they are still using it today.
👍 1
r

Raed Ghazal

12/12/2023, 8:31 PM
im having great success with compose MP with iOS fwiw
same
r

Ryan Simon

12/12/2023, 9:08 PM
I've been using KMP for my startup for a while now and about to go live in the app stores soon. We're also using Kotlin + Ktor for the server side Sharing type safe Ktor resources between API and client has been super nice There's been some hiccups here and there with iOS syntax but otherwise great. I personally don't recommend using Compose Multiplatform for production iOS apps just yet as basic things like having a text field in a scrollable list don't work properly yet.
🚀 1
👀 1
b

brandonmcansh

12/12/2023, 9:33 PM
Weird it works quite well for me
r

Ryan Simon

12/12/2023, 9:35 PM
I'm sure compose iOS works for super basic UI, but here's the bug report thread for the problem I mentioned https://kotlinlang.slack.com/archives/C0346LWVBJ4/p1701892242222879?thread_ts=1701892242.222879&cid=C0346LWVBJ4
Not trying to discourage trialing compose for iOS, but I'd call my linked bug a very common use case in an app. Not acceptable for a production app
j

Joel Denke

12/13/2023, 7:34 AM
@Ryan Simon Want to say not basic case not even in androidx compose world using single textfield in lazy list. But yes input fields in iOS has got some improvements lately, especially in compose MP 1.5.0. To our defense, input fields imo in material been buggy in Android in general and not isolated to iOS.
4 Views