CodeLabs at KotlinConf 2024

· 3 min read

Touchlab is presenting three codelabs at KotlinConf, demonstrating industry leading techniques for adopting KMP. These sessions are tailored for teams integrating KMP into their native application workflows, providing a vision for the future of streamlined app and product development.

KMP technology is mature. The models that teams use to apply the technology need to mature as well.

Requirements

There will be several posts with background info and sample projects coming over the next few weeks. To get the most out of our lab presentations, you should check back to get familiar with the background info.

For those wishing to participate by coding in the codelabs, you’ll need the following:

  • A MacBook, with 16g ram minimum and a relatively recent version of MacOS
  • A JVM capable of running Kotlin 1.9.2x and Gradle 8.4 or newer. JVM 11 or 17.
  • Xcode 15.1 or newer

To ensure you have a functional KMP installation, check out JetBrains kdoctor

All of these labs assume reasonable KMP experience. Make sure to check out Get started with Kotlin Multiplatform, and various sample apps:

CodeLabs

Mature KMP adoption models for native mobile teams

Sharing KMP code has the potential to dramatically increase product development efficiency and quality. How KMP is integrated can make all the difference, good and bad. KMP presents unique logistical challenges that require updated approaches.

Prepare repos and tools for the lab

Close the Platform Gap With the “Bad Swift Simulation”

KMP provides far better interop with Swift than any other code sharing option, but Kotlin and Swift are different languages. How you design and structure your APIs, and the tools you use to do so, can make all the difference. All valid Kotlin code will be exported to the Swift caller, but not all Kotlin will work as you expect.

Learn about better Swift APIs and how to build them.

Read more here

Get a headstart by cloning the exercise repo ahead of the codelab:

touchlab/BadSwiftSimulator

Multiplatform Compose + SwiftUI = The Native App Future

Being able to blend Compose UI and SwiftUI on iOS offers app developers the opportunity to create mostly-native experiences from mostly-shared Kotlin. How you structure your applications will mean the difference between an easy merge of the technologies, and a painful architectural mismatch.

We’ll demo how to approach the concept, how we’re approaching this technology with current clients, and discuss the parts of this stack that are in desperate need of fresh libraries and approaches.

Read more here

Get a headstart by cloning the exercise repo ahead of the codelab:

touchlab/compose-swiftui-codelab

Missed Us At KotlinConf’24? No Problem!

Whether you weren’t able to make it to KotlinConf this year, or you just couldn’t make a CodeLab, don’t worry. We’ll be hosting encores of each CodeLab this summer.