talira

Kotlin Multiplatform

Go cross-platform without compromising performance, UX, or code quality

open sourceApache-2.0self-hostablefree

Kotlin Multiplatform (KMP) is JetBrains' technology for sharing Kotlin code across Android, iOS, web, desktop and server while keeping access to each platform's native APIs. You choose how much to share: an isolated piece of business logic, the whole data and logic layer with fully native UIs, or up to all of the app including UI with Compose Multiplatform. Kotlin functions are callable from Swift, iOS APIs can be used from Kotlin, the web is reached through Kotlin/JS and Kotlin/Wasm, and many Android libraries, including Google's Room, DataStore and ViewModel, work in shared code. It's part of the Kotlin toolchain (the Kotlin Multiplatform Gradle plugin) and Apache-2.0 licensed; Duolingo, McDonald's and Google Workspace describe using it.

Problems it solves

  • share business logic between my Android and iOS apps without rewriting it in Swift
  • build Android and iOS apps from one Kotlin codebase while keeping native UI
  • share up to all of my app's code, including UI, across Android, iOS, desktop and web
  • make my existing Android app cross-platform while keeping most of the Kotlin code
  • call Kotlin code from Swift in an iOS app
  • share validation rules and networking code between mobile apps and a Kotlin backend
  • a cross-platform alternative to Flutter or React Native with native performance

Features

  • share logic only, logic with native UI, or logic and UI with Compose Multiplatform
  • targets Android, iOS, web, desktop and server
  • Kotlin functions callable from Swift; iOS APIs usable from Kotlin
  • web through Kotlin/JS and Kotlin/Wasm
  • Android Jetpack libraries such as Room, DataStore and ViewModel in shared code
  • Kotlin Multiplatform Gradle plugin

Alternatives

The same job

These do what Kotlin Multiplatform does.

  1. React Native Learn once, write anywhere
  2. .NET MAUI Build native Android, iOS, macOS and Windows apps from one C# and XAML codebase
  3. Flutter Build apps for any screen

Compare Kotlin Multiplatform with the top 3