
Generally speaking, if you want to interop with Swift of your own, creating interfaces in Kotlin and passing that into the shared code is a good way to do it. This is possible because of the Kotlin/Native Infrastructure built by JetBrains.For Android, it converts the IR to Java Bytecode and for iOS, it converts IR to the iOS native machine-executable code.Īrguable, but KMM is the Future for large scale apps. Backend - It converts the IR into the native code that is machine-executable.

That IR is capable of getting converted into the native code that is machine-executable using the backend which is described below. Frontend - It converts the Kotlin Code into the IR (Intermediate Representation). Here comes the Kotlin Compiler into the picture. If you are trying to build an app thats going to grow in large scale and need native features and should be performant, but, you don't want to have two different teams, then KMM is the answer. You can develop multiplatform mobile applications and share parts of your applications between Android and iOS, such as core layers, business logic, presentation logic, and more. Kotlin Multiplatform Mobile (KMM) is an SDK for cross-platform mobile development.

UI is built using jetpack Compose and Swift UI. I have made a template and a sample application with clean architecture and everything is shared except the UI (Even viewmodels). Can you build two different OS native apps with same code base ?
