4 ms·
I have great success using Kotlin Multiplatform to share code between iOS and Android. Have a look at my Android Jetpack Compose and iOS SwiftUI project sharing
by skinnyasianboi 7y ago
I have great success using Kotlin Multiplatform to share code between iOS and Android. Have a look at my Android Jetpack Compose and iOS SwiftUI project sharing the common logic for a game https://github.com/SimonSchubert/Braincup https://github.com/SimonSchubert/Braincup
- skinnyasianboi 7y agoIt's worth to mention that it also supports native Linux, Windows and macOS buildings. Plus web via JavaScript and server via jvm.
- victor106 7y agoThis is really cool. Care to share some resources from which others can learn to get started?
- soulnothing 7y agoThis is the official docs https://kotlinlang.org/docs/reference/multiplatform.html https://kotlinlang.org/docs/reference/multiplatform.html I've also done multi platform recently. I've taken a contract first approach. Swagger / openapi for rest clients. Outside of that I use vertx which has bindings for almost every platform. With those two I can account for interoperability across all platforms. Big hitches * No ts.d defintions at this time. But: https://github.com/vojtechhabarta/typescript-generator https://github.com/vojtechhabarta/typescript-generator * Dukat for automatic typescript definition importing (beta) https://github.com/Kotlin/dukat https://github.com/Kotlin/dukat * I've not done LLVM iOS. But I've read of some generic issues. They are improving dependency management to handle multi platform. I can't find a link but it was on their blog