The Kotlin Swift boundary
summary
Kotlin/Native compiles to Objective-C-compatible bytecode but idiomatic Swift often breaks: default parameters lost through the Obj‑C layer, generics erased at protocol boundaries, and reference‑counting plus the freeze API create surprising concurrency constraints. Practical fixes include adapter classes, JSON ↔ NSDictionary bridges using kotlinx.serialization, a flow-to-publisher adapter to expose Kotlin Flows as Combine publishers, and packaging via frameworks/CocoaPods or SPM wrappers; a new memory model lands experimentally in Kotlin 1.6 M1.
AI-written summary · about
chapters (16)
- 0:00Kotlin Swift boundary intro
- 1:25Kotlin multi-platform overview
- 4:17Shared vs platform Kotlin code
- 7:48Kotlin multi-platform model
- 8:08Bridging Kotlin to Swift
- 10:15Default params in Swift interop
- 12:46Generics challenges in interop
- 15:37Protocols and generics limits
- 16:40Kotlin memory model for iOS
- 19:08Kotlin data vs Swift structs
- 21:15Kotlin sealed vs Swift enums
- 22:59Async in Kotlin and Swift
- 26:10Shared logic case study
- 29:02Key lessons from interop
- 31:53Future of Kotlin multi-platform
- 32:55Q&A on interop
related talks
49mEffective Kotlin-Swift Interoperability
45mSDK Design and Publishing For Kotlin Multiplatform Mobile
36mWriting Kotlin Multiplatform libraries that your iOS teammates are gonna love
52mKEYNOTE: Kotlin/Native – Embracing existing ecosystems
33mKotlin Multiplatform Alchemy: Making Gold out of Your Swift Interop
21mKotlin For Swift Developers
37mKotlin and Compose Multiplatform patterns for iOS interop
39mDependencies and Kotlin/Native
