Here are we are importing the class on the Android app:Īnd here on the iOS app under Swift code: ![]() After importing it, you can freely invoke/instantiate any KMM classes on your project, without any channels or custom integrations. For iOS, it will compile the code through LLVM and produce an iOS framework. When it's compiling on Android, the result will be Java bytecode, like any other native Android library. This point may sound like a trick, but the integration takes into account the first-class language of the platform. ![]() ![]() Image from KMM website KMM compiles to native code This will be a nice choice for projects that you don't want to share UI, just the "core" business logic. This might not look good at first glimpse, but sharing just the business logic and making each platform implement its own UI helps you keep the look and feel of the platform without any problems. While other multiplatform frameworks try to help you with everything, from UI to business logic, KMM helps you share just the business logic. KMM does not try to solve all existing problems In this article, I'll bring to you some KMM pros and cons. But KMM has a different concept and tries to solve the problem using a different perspective. Taking a quick look at it, many developers may think that it's just another framework to do the same. With KMM you can create multiplatform applications using all modern Kotlin APIs. ![]() Last year, JetBrains announced the alpha version of Kotlin Multiplatform Mobile (aka KMM).
0 Comments
Leave a Reply. |