Kotlin Multiplatform Android, iOS and Desktop Apps with shared UI — React Native killer — Introduction.

Adrian Witaszak
3 min readFeb 18, 2023

Welcome to my series of blog posts on building a Kotlin multiplatform application for multiple platforms using Jetbrains Compose. Kotlin has gained popularity among developers due to its interoperability and versatility. Kotlin multiplatform is a feature that allows developers to write a single codebase that can be used across multiple platforms, such as Android, iOS, Desktop, Web and backend.

Jetbrains Compose is fast reactive Mobile, Desktop and Web UI framework for Kotlin, based on Google’s modern toolkit and brought to you by JetBrains. With JetBrains Compose, developers can write once and use across all platforms, making it an ideal fit for multiplatform projects.

In this series, we will be exploring the process of building a KMM application with a shared UI using Jetbrains Compose, which is Jetbrains version of Google’s Jetpack Compose toolkit for Android. Here is the link to the official repo, where you can find plenty of other useful KMM examples.

Jetpack Compose is a modern UI toolkit that allows developers to create beautiful and responsive user interfaces with minimal code.

Throughout this series, we will cover the following topics:

  • Creating and setting up a new Kotlin multiplatform project for Android and iOS
  • Building a shared UI component using Jetbrains Compose
  • Integrating the shared UI component into the Android and iOS modules
  • Building and running the application on multiple platforms
  • Best practices for Kotlin multiplatform development with Jetpack Compose
  • State management in shared UI modules

By the end of this series, you will have a solid understanding of how to build a Kotlin multiplatform application with a shared UI using Jetpack Compose. Whether you are a seasoned developer or just getting started with Kotlin multiplatform, this series will provide valuable insights and tips to help you create multiplatform applications with ease. Stay tuned for the first post in this series, where we will explore how to create a new Kotlin multiplatform project with Jetpack Compose.

To make the project a bit more interesting, we will build an App that will:

  • Display a list of nearby Bluetooth devices
  • Display details of each BT device
  • Save one of BT devices as a favourite one
  • Every time we discover our favourite BT device, we will track our location if we exit the Geofence.
  • When the BT device disappears, we will set up a new Geofence.
  • Save the location data in the local database.
  • Sync Data with remote backend.
  • and more and more

Thank you for reading! I hope you found this post helpful. If you enjoyed it, please consider sharing it with your friends and colleagues. You can also follow me on Medium or Twitter to stay up-to-date on my latest posts. As always, I welcome your feedback and comments. Thank you again for your support!

Twitterhttps://twitter.com/adrianwita

Githubhttps://github.com/charlee-dev

--

--