The Triumphs and Tribulations of Kotlin-Native in Practice
summary
Claim: Kotlin/Native compiles shared Kotlin to native via LLVM and can run on iOS and Android but demands many workarounds. Tools used: Gradle multi‑platform, Kotlin/Native via LLVM, Ktor client and kotlinx.serialization, Xcode interop that exposes Objective‑C headers. Built a server plus a Raspberry Pi–controlled deadbolt prototype that actually locks/unlocks from both apps. Surprises: coroutine dispatch differs (iOS uses NSURLSession on main thread), freezing object graph causes mutability exceptions, extensive Gradle version friction and manual Xcode linking.
AI-written summary · about
chapters (8)
- 0:00Start
- 15:05FUNCTIONS WITH PER-PLATFORM IMPLEMENTATIONS expect fun
- 16:03CALLING CODE FROM BOTH APPS!
- 19:52DECIDING WHAT TO CENTRALIZE
- 23:29FREEZING
- 24:06RETURNING A NEW OBJECT
- 33:22runBlocking DOESN'T EXIST FOR ALL PLATFORMS
- 35:02SERVER DEVELOPMENT
related talks
38mKotlin/Native
52mBuilding apps using Kotlin Native
26mKotlin/Native for Multiplatform Development
31mKotlin/Native for Multiplatform Development
52mKEYNOTE: Kotlin/Native – Embracing existing ecosystems
48mKotlin for Android, iOS & the mobile web
18mKotlin native
30mReusable Cross-Platform Frameworks with Kotlin/Native
