Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition
Abstract:After discovering a new interesting technology or framework, you will probably start asking yourself how to integrate it into an existing project. That's because, the possibility of starting with a blank canvas is rare (not impossible, but rare).
This is also the case for Kotlin Multiplatform, which is getting more and more hype every day. And now, that the technology has become stable, it's the perfect time to start using it! In this hands-on session, we will start with an existing Android and iOS application that "lives" in separate repositories, we will extract the business logic from the Android app and share it between the two apps with a Kotlin Multiplatform library. We will also cover how to distribute the library to the existing applications. By the end of this workshop, you'll have a better understanding of what is needed to start using Kotlin Multiplatform in your existing projects.
To follow along in the workshop you will need:
- Android Studio with the Kotlin Multiplatform Mobile plugin:
The GitHub project contains a start folder with an initial workspace for the workshop:
and an end folder with two final workspaces: one that deploy the Kotlin Multiplatform locally and one that deploy it on GitHub packages.
Creating a multiplatform binary framework bundle
Binary Frameworks in Swift
Build final native binaries
Distributing binary frameworks as Swift packages
Xcode 13.3 supports SPM binary dependency in private GitHub release