Kotlin Multiplatform Mobile (KMM) is an SDK which enables developers to share code for both Android and iOS mobile app developments.
While the KMM which is developed by JetBrains draws on the mulitiplatform capabilities already available in Kotlin to streamline the experience of building truly cross-platform mobile applications. And the SDK is bundled as a preview of KMM plug-in for the Android Studio IDE that allows developers to write, run, and debug code in the same IDE.
According to JetBrains, both Android and iOS versions of an application have a lot in common, but also, there are significant differences, particularly in the UI. These differences can range from subtle variations in scrolling behavior to divergent navigation logic.
How KMM will offer flexibility by retaining native programming benefits
Since application business logic includes data management, analytics, and authentication, which can be pretty identical, it’s natural to share parts of an application across platforms while keeping the other parts separate.
Therefore, KMM offers the flexibility while also retaining native programming benefits, so that a single codebase can be used for business logic with platform-specific logic written only when necessary, whether for native UI or working with platform-specific APIs.
The shared code written in Kotlin is compiled to JVM bytecode with Kotlin/JVM and to native binaries via Kotlin/Native.
How to integrating KMM into Your existing projects
KMM business modules can be used like every other mobile library, and developers don't need to switch IDEs or have Apple’s Xcode running to make sure that code works properly using the plug-in.
JetBrains has set up a Kotlin Multiplatform Mobile developer portal and published an extensive guide on integrating KMM into existing projects.