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

Jolas

05/19/2020, 11:45 AM
I am Planning to develop apps for Android and IOS platforms. I came across Kotlin/Native technology and found a huge potential to have shared logic via a single Kotlin/native module. But from tech docs and samples I’ve seen only pinch of an iceberg . I am wondering if it’s stable enough for production. Because still while running builds I get a message “Kotlin/native is experimental” So do you recommend Kotlin/Native to be used for production Android/IOS apps? React with 👍🏾 for yes 👎🏾 for not yet
1
👍 15
g

gildor

05/19/2020, 11:48 AM
Kotlin/Native on Android too?
j

JoakimForslund

05/19/2020, 11:49 AM
My two cents are. Writing your logic layer in kotlin multiplatform works well. You will run into a few cumbersome issues working with 3rd party libs and cocoapods in iOS, and a lot of manual labor, but from what i've done, most of it is easy to solve. Working with android is just basicly the same as working with a traditional android library. You still work with ios & android UI seperatly which is actually a strong-point in my book. It might be a bit cumbersome to come to terms with setting up xcode to use the produced framework/lib file from the iOS target, but give it some time and it will work well.
👍 1
j

Jolas

05/19/2020, 11:57 AM
@gildor please refer https://kotlinlang.org/docs/reference/native-overview.html so that you’ll get a clear picture of Kotlin/Native usage.
g

gildor

05/19/2020, 11:59 AM
Ahah, thanks for advice 👍 Wish you the same
I just want to make your question more clear. Just in case, you can use Kotlin/Native on Android too, just in theory this is why I asked, maybe you have some tricky use case for it You probably want to ask about Kotlin Multiplatform not about Kotlin/Native on Android/iOS, because on iOS it will be Kotlin/Native (and it’s the only real option), on Android it by default Kotlin JVM, but you also can use Kotlin/Native there,
j

Jolas

05/19/2020, 12:07 PM
Edited my question with explanation. @gildor Let me know if it is enough.
g

gildor

05/19/2020, 12:09 PM
I think it’s nice explanation of your use case 🙂 K/N is still experimental, but there are apps and libs which use it for production
j

Jolas

05/19/2020, 12:12 PM
Can you mentions those ?
g

gildor

05/19/2020, 12:12 PM
Recommend it to you it’s another story, it depens on your use case, writing iOS from scratch, as Joakim wrote above, it’s not so smooth, you are still early adopter, it may require more work. Also you should figure-out what to do to share as much UI logic as possible I recommend you to check blog of Touchlab - https://touchlab.co/blog/ They have many materials with overview Kotlin for iOS
j

Jolas

05/19/2020, 12:13 PM
Thanks 👍🏾
g

gildor

05/19/2020, 12:14 PM
https://badootech.badoo.com/reaktive-a-multiplatform-library-for-reactive-kotlin-android-ios-77b6ff25adb1 https://developer.squareup.com/blog/developing-on-ios-and-android/ https://medium.com/vmware-end-user-computing/adopting-a-cross-platform-strategy-for-mobile-apps-59495ffa23b0 It just 1 minute search in Google: so Badoo, Square, VMWare Probably on different level of adoption, because you not necessary should write whole app on Kotlin for iOS, you can share just some business logic, like Square who probably share database layer
👍 1
j

Jolas

05/19/2020, 12:37 PM
@gildor I know I can get stuffs from google, but I asked you since, you said that there are some apps. Anyway, thanks 👍🏾
k

Kris Wong

05/19/2020, 12:44 PM
Stable and ready for production are not the same. The latter implies the former, but not the other way around.
Jetbrains considers KMP to be experimental. Are you comfortable shipping bleeding edge tech?
j

Jolas

05/19/2020, 1:00 PM
@Kris Wong Yes, I am comfortable shipping with bleeding tech. I find Kotlin/Native to be comfortable so far. I’m just trying to get opinions from our community.
a

Arkadii Ivanov

05/19/2020, 2:55 PM
You might be interested in this article as well: https://badootech.badoo.com/mvi-in-kotlin-multiplatform-part-1-1-of-3-205c6feb4ac7 The second (most interesting) part is already under review
👍 1
k

Konstantin Petrukhnov

05/19/2020, 3:38 PM
KMP will not eliminate need for ios/android specific competences (building artifacts, understanding threading and memory model of each platform, ability to invest time to upgrade to newer versions).
Sometimes it is just faster to have 2 separate implementations: one for each platform.
y

yaseen

05/20/2020, 5:09 AM
@Jolas Careem uses KMP for their driver apps in production. Here's a great talk from Careem's team.

https://youtu.be/R61N5yJGhKI

👍 1
j

Jolas

05/20/2020, 5:13 AM
Thanks @yaseen seems very useful.
3 Views