Menu
Kotlin mobile SDK shares code across Android, iOS

Kotlin mobile SDK shares code across Android, iOS

Kotlin Multiplatform Mobile plug-in allows developers to write, run, and debug shared code in Android Studio

Credit: Google

JetBrains has released an alpha version of Kotlin Multi-platform Mobile (KMM), an SDK that enables developers to use the same business logic in both Android and iOS mobile applications.

KMM draws on the muliti-platform capabilities of Kotlin to streamline the end-to-end experience of building cross-platform mobile applications. The SDK is enabled by a preview of a KMM plug-in for the Android Studio IDE that allows developers to write, run, and debug shared code in the same IDE.

JetBrains said Android and iOS versions of an application can have a lot in common but also significant differences, particularly in the UI. Differences can range from subtle variations in scrolling behaviour to divergent navigation logic.

However, because application business logic including data management, analytics, and authentication can be identical, it’s natural to share some parts of an application across platforms while keeping other parts separate.

KMM offers flexibility while retaining native programming benefits. A single codebase can be used for business logic while platform-specific logic can be written when necessary, whether for a native UI or to work with platform-specific APIs.

Shared code written in Kotlin is compiled to JVM bytecode with Kotlin/JVM and to native binaries via Kotlin/Native. Thus, KMM business modules can be used like any other mobile library. With the plug-in, developers do not need to switch IDEs and have Apple’s Xcode running to ensure that code works properly on both platforms.

Companies already have saved time and effort sharing code between platforms, such as Quizlet and Fastwork, JetBrains said. The company has set up a KMM developer portal and published a guide on integrating KMM into existing projects.


Follow Us

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags GoogleAndroidios

Events

Featured

Slideshows

Channel kicks 2021 into gear as After Hours returns to Auckland

Channel kicks 2021 into gear as After Hours returns to Auckland

After Hours made a welcome return to the channel social calendar with a bumper crowd of partners, distributors and vendors descending on The Pantry at Park Hyatt in Auckland to kick-start 2021.

Channel kicks 2021 into gear as After Hours returns to Auckland
The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards

Hundreds of leaders from the New Zealand IT industry gathered at the Hilton in Auckland on 17 November to celebrate the finest female talent in the Kiwi channel and recognise the winners of the Reseller News Women in ICT Awards (WIICTA) 2020.

The Kiwi channel gathers for the 2020 Reseller News Women in ICT Awards
Show Comments