
In contrast, you can share code between Server and Client, iOS, Android, Javascript, Desktop (macOS, windows, linux), webassembly etc. And despite the fact that I am focusing more on sharing code between iOS and Android, it doesn’t mean that you are limited to this. Write this business logic once and share in with multiple targets.

Generally, it’s the so-called business logic.Īnd that is the problem that KMP is there to solve. The Realm team is happy to announce the beta release of our Realm Kotlin SDKwith support for both Kotlin for Android and Kotlin Multiplatform apps. Usually, it’s related to network requests, the transformation of the data fetched so that they can populate views and/or something else. Quite often while developing an app, we end up in scenarios where we have to write a lot of duplicate or similar code between the iOS and Android app. Thanks to Kotlin native(or K/N), we are able to compile Kotlin code to native binaries, including but not restricted to iOS, meaning that we can write some code in Kotlin which can be used on both the iOS and Android app. Kotlin Multiplatform Project(or KMP from now on) is an experimental feature that allows us to write code in Kotlin and compile/transpile this codebase to multiple platforms including JVM, Android, iOS, Javascript, Desktop apps, etc. Thus, I will try to document my steps and learning in a series of posts, starting from this one.


I have recently started playing around with Kotlin Multiplatform Project, and it seems quite an interesting project to me. Hi, time has come to write something about Kotlin Multiplatform Project and more specifically how to setup a project with an iOS app, an Android app and a shared library.
