KMM survival guide: how to tackle everyday struggles between Kotlin and Swift
summary
Kotlin Multiplatform Mobile (KMM) is alpha but already shares business logic while compiling a shared module into an XCFramework and revealing specific failures: Objective‑C bridging drops generics and inline/value classes, suspending functions arrive on iOS as callbacks losing nullability, and Result and default parameters vanish. Workarounds include converting to platform enums or using IceRock plugin to generate enums, applying KMP native coroutines for suspending APIs, enabling JetBrains new memory model (e.g. 1.6.20), and publishing libraries as Swift Packages; practical but imperfect.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:20How does it work?
- 3:51Reality
- 5:21Primitive types
- 6:57Sealed classes
- 8:44Generic sealed class
- 10:43Generics and sealed class
- 13:45Inline class
- 16:27Coroutines
- 22:41Default parameters
- 23:39Exception handling
- 25:43Third-party libraries
- 31:23The future
related talks
36mWriting Kotlin Multiplatform libraries that your iOS teammates are gonna love
29mKMP for Mobile Developers
46mKotlin Multiplatform Mobile for Teams
19mBuilding Bridges with Kotlin Multiplatform Mobile (KMM): How we added KMM to our established App
46mUnlocking Scalability: Power Up Your Native App with KMM
46mWhy KMM Is Not a Cross-Platform Framework
21mIt's Time for Kotlin Multiplatform Mobile
39mKMM Against Everyone
