• Skip to homepage
  • Skip to main content
  • Skip to main navigation
  • Skip to meta navigation
Zühlke - zur Startseite
  • Business
  • Careers
  • Events
  • About us

Language navigation. The current language is english

  • Expertise
    • AI implementation
    • Cloud
    • Cybersecurity
    • Data solutions
    • DevOps
    • Digital strategy
    • Experience design
    • Hardware engineering
    • Managed services
    • Software engineering
    • Sustainability transformation
    Explore our expertise

    Highlight Case Study

    Airport concept

    Zurich Airport transforms operations for a data-driven future

    Learn more
  • Industries
    • Banking
    • Insurance
    • Healthcare providers
    • MedTech
    • Pharma
    • Industrial sector
    • Commerce & retail
    • Energy & utilities
    • Government & public sector
    • Transport
    Explore our industries

    Subscribe to recieve the latest news, event invitations & more!

    Sign up here
  • Case studies

    Spotlight case studies

    • Global Research Platforms and Zühlke are fighting Alzheimer's disease
    • Brückner Maschinenbau leverages GenAI to optimise efficiency by improving master data management
    • UNIQA: AI chatbot increases efficiency – 95% accuracy with half the effort
    Explore more case studies

    Highlight Case Study

    Airport concept

    Zurich Airport transforms operations for a data-driven future

    Learn more
  • Insights

    Spotlight insights

    • How to apply low-code technologies in the insurance industry
    • Retail CTO playbook for managing the tech transformation
    • DeepSeek and the rise of open-source AI: A game-changer for businesses?
    Explore more insights

    Highlight Insight

    AI adoption: Rethinking time and purpose in the workplace

    Learn more
  • Academy
  • Contact
    • Austria
    • Bulgaria
    • Germany
    • Hong Kong
    • Portugal
    • Serbia
    • Singapore
    • Switzerland
    • United Kingdom
    • Vietnam

    Subscribe to recieve the latest news, event invitations & more!

    Sign up here
Zühlke - zur Startseite
  • Business
  • Careers
  • Events
  • About us
  • Expertise
    • AI implementation
    • Cloud
    • Cybersecurity
    • Data solutions
    • DevOps
    • Digital strategy
    • Experience design
    • Hardware engineering
    • Managed services
    • Software engineering
    • Sustainability transformation
    Explore our expertise

    Highlight Case Study

    Airport concept

    Zurich Airport transforms operations for a data-driven future

    Learn more
  • Industries
    • Banking
    • Insurance
    • Healthcare providers
    • MedTech
    • Pharma
    • Industrial sector
    • Commerce & retail
    • Energy & utilities
    • Government & public sector
    • Transport
    Explore our industries

    Subscribe to recieve the latest news, event invitations & more!

    Sign up here
  • Case studies

    Spotlight case studies

    • Global Research Platforms and Zühlke are fighting Alzheimer's disease
    • Brückner Maschinenbau leverages GenAI to optimise efficiency by improving master data management
    • UNIQA: AI chatbot increases efficiency – 95% accuracy with half the effort
    Explore more case studies

    Highlight Case Study

    Airport concept

    Zurich Airport transforms operations for a data-driven future

    Learn more
  • Insights

    Spotlight insights

    • How to apply low-code technologies in the insurance industry
    • Retail CTO playbook for managing the tech transformation
    • DeepSeek and the rise of open-source AI: A game-changer for businesses?
    Explore more insights

    Highlight Insight

    AI adoption: Rethinking time and purpose in the workplace

    Learn more
  • Academy
  • Contact
    • Austria
    • Bulgaria
    • Germany
    • Hong Kong
    • Portugal
    • Serbia
    • Singapore
    • Switzerland
    • United Kingdom
    • Vietnam

    Subscribe to recieve the latest news, event invitations & more!

    Sign up here

Language navigation. The current language is english

Homepage zuehlke.com

All industries

Kotlin Multiplatform: Simplifying cross-platform app development

December 06, 20217 Minutes to Read
smartphone
With insights from
Sergi-Profile

Serge Nino Martin Villasica

Software Engineerserge.villasica@zuhlke.com
  • Kotlin Multiplatform (KMP) is a new SDK that combines the best of both worlds, allowing app developers to reuse codebase just like a cross-platform framework while still keeping the app native.

  • Tackling the challenge of maintaining separate codebases while retaining flexibility, KMP is used by diverse companies from start-ups to large IT corporates and big product companies.

  • With KMP already stable, it has good potential to become the next go-to tool for cross-platform projects, aside from Flutter and React Native.

Looking for greater compatibility, flexibility, efficiency, and ease of adoption for cross-platform mobile app development? Read on for an engineer’s take on Kotlin Multiplatform (KMP) and how it works.

As smartphone users around the world continue to grow, cross-platform applications are gaining popularity as they allow wider outreach to potential Android and iOS users while providing high-efficiency outputs and significant cost reduction.

By the end of 2024, 91% of the global population will own a smartphone. These numbers will only continue to grow as global smartphone users surpass 7 billion and are expected to grow by several hundreds of millions in the next few years.

Android smartphones currently lead the global market with a 70% market share while iOS follows closely at 28%. In mobile development, building cross-platform applications enables wider market reach to both Android and iOS users while providing highly efficient output and significant cost reduction.

Current state of mobile app solutions

Mobile app development is the process of building specific software applications that runs on smartphones. It involves a strategic approach from researching to prototyping, building to testing, before finally launching on the app store.

Android and iOS – these two platforms always come to mind when talking about mobile development. It is very rare to see a mobile application that is only available on one platform and not the other.

Commonly, there are two options to build mobile applications for these two platforms:

  • Write fully separate platform code, once for Android and once for iOS
  • Write cross-platform code for both Android and iOS

Projects that need to fulfil certain performance, security, and native device requirements and have enough resources will most likely use a fully separate platform code for either. However, this means that two separate codebases will need to be maintained, potentially by two separate teams of developers with different skillsets.

Code written in Android Studio from developer.android.com
Code written in Android Studio from developer.android.com
Code written in xCode from codewithchris.com
Code written in xCode from codewithchris.com

Meanwhile, for projects that require a quick prototype or a UI-heavy app that does not depend much on the underlying hardware and native integration — a single cross-platform framework will be the obvious choice. Some popular frameworks here are React Native, Flutter, Xamarin, and Cordova.

React native illustration

Introducing Kotlin Multiplatform (KMP) and how it works

In 2020, JetBrains announced the Kotlin Multiplatform as a new SDK that allows developers to write shared code for business logic and still maintain a platform-specific UI code, and in 2023, they released KMP as stable and production-ready. It combines the best of both worlds, being able to reuse a huge amount of codebase just like a cross-platform framework but keeping the app still native.

KMM High level diagram

A typical KMP project contains a shared business logic unit with different UI implementations per platform. For Android, Compose UI will be used to write UI code while for iOS, SwiftUI is mostly used. However, with the introduction of Compose Multiplatform, it is now possible to write a single UI codebase for both platforms using Compose UI only. This version is still in beta and is actively being developed and improved by JetBrains.

KMP is made possible by the multiplatform capabilities of the Kotlin language. This means that writing a single Kotlin codebase can target platforms such as JVM, JavaScript, and Native/Desktop. In the case of KMP, the shared Kotlin codebase is compiled into a Java library for Android and into a Swift library for iOS. Kotlin to Java compilation seems straightforward since both are JVM languages, but for the Kotlin to Swift compilation, it uses a compiler infrastructure called LLVM. From the figure below, it is shown that Kotlin code can be targeted for Android and iOS platforms as libraries.

kmm code can be compiled for different platforms

How is Kotlin Multiplatform being used?

KMP is all about pragmatic programming to meet the growing demand across platforms. Furthermore, developers who are already familiar with Kotlin will find it easy to start using KMP to simplify their development projects.

PlanGrid by Autodesk is a construction productivity app that allows project collaborations and is used on over 1.8 million projects in more than 100 countries globally. It uses KMP to ship a single source of truth for offline sync logic and data models for 3 mobile platforms: iOS, Android and Windows.

The team at Cash App, a mobile payment service developed by Square, Inc, also had massive success in piloting KMP. Not only was the transition manageable for the different teams, developers had the option to share codes in the repository without disrupting their workflow.

KMP Project Structure

A new KMP project can be created using Android Studio with the KMP Application in the New Project Wizard.  This will generate the androidApp module, iOSApp module, as well as the shared module.

New KMM Project

The Shared Module

The androidApp and iOSApp modules are straightforward. These are the modules where the platform-specific application code is written, the same as you would write for a native Android or iOS application. The shared module, however, is “shared” between platforms and the Kotlin multiplatform code will be compiled into the specific binaries as illustrated above.

A typical Hello World application for a KMP project will display a greeting string with the platform OS version used in the app, such as “Hello Android 15” or “Hello iOS 18”. This logic will lie in the shared code and the UI part will not know the specific details of this value.

platform-specific code

From the illustration above, the Platform class, which is located inside the shared module, is accessed by both the UI code for Android and iOS. Take note of the new keywords introduced in Kotlin multiplatform, the expect and actual keywords.

Classes marked with the expect keyword indicates that KMP expects a platform-specific value or implementation for this symbol. For a class, it expects another class with the same name that is marked with the actual keyword. For a variable, it expects another variable with a value inside another actual class.

This actual implementation should be created in both iOS and Android platforms for the module to compile. If platform-specific code is not needed, then the code will be implemented in the common module.

Running the KMP Project

You can run a KMP application the same way as you would run a typical native Android or iOS project. Use Android Studio to run the app in an Android simulator or use XCode to run the iOS app in an iOS simulator.

android ios mockup

Migrating Existing Projects into KMP

It is possible to migrate existing native projects into KMP. Existing business logic from the Android code with Kotlin is extracted into a separate library, which is used to share with the iOS app.

If the existing project is well-designed and loosely coupled, it will only take minimal effort to extract the business logic from a monolithic application.

The Future of Cross-platform Development

Kotlin Multiplatform is a great software development kit and solves a lot of problems in the mobile development ecosystem. Sharing code between platforms becomes more resource-efficient, while giving you full control of the platform-specific technologies available in Android and iOS, without being trapped in a cross-platform or hybrid framework.

However, though it already reached a stable and production-ready state, this technology is still very new. Though it is expected that APIs and dependencies might still change, it is also important to note that using KMP has been used now by large companies such as Netflix, Forbes, Square and Autodesk. 

With Kotlin Multiplatform being stable, it is anticipated that more companies will start to adopt it as an alternative for cross-platform projects aside from React Native and Flutter.

We recommend fellow mobile developers to keep an eye on further developments on KMP, as it is also a great opportunity to have a headstart with hands-on practice on this tool and experiment with the APIs. With JetBrains’ dedicated commitment to improve and evolve this toolkit, KMP is likely to take off in the near future.

Sergi-Profile

Serge Nino Martin Villasica

Software Engineer

Serge is a Software Engineer at Zuhlke. He has experience in diverse sectors such as research and development, banking, and financial institutions where he worked on cross-platform solutions in React Native and web applications using ReactJS and Typescript.

He also enjoys writing mobile applications in Android using Kotlin and iOS using Swift. 

Serge holds a degree in Computer Engineering from University of San Carlos, Philippines.

View LinkedIn Profile of Serge Nino Martin Villasica
Sergi-Profile

Explore more Insights

All industries

Unlock Cloud value with FinOps: Maximizing efficiency & savings

Learn more
smart city with light trail
Industrial sector

Sustainability guide: A five step path to circularity for the industrial sector

Learn more
Birdseye picture of a man on a construction site climbing up a metal ladder in a hard hat and high-vis jacket.
All industries

AI predictions: how AI will impact your organisation

Learn more
Discover all Insights

Get to know us

  • About us
  • Impact & commitments
  • Facts & figures
  • Careers
  • Event Hub
  • Insights Hub
  • News sign-up

Working with us

  • Our expertise
  • Our industries
  • Case studies
  • Partner ecosystem
  • Training Academy
  • Contact us

Legal

  • Privacy policy
  • Cookie policy
  • Legal notice
  • Modern slavery statement
  • Imprint

Request for proposal

We appreciate your interest in working with us. Please send us your request for proposal and we will contact you within 72 hours.

Request for proposal
© 2025 Zühlke Engineering AG

Follow us

  • External Link to Zühlke LinkedIn Page
  • External Link to Zühlke Facebook Page
  • External Link to Zühlke Instagram Page
  • External Link to Zühlke YouTube Page

Language navigation. The current language is english