Building a library for Android and iOS using Kotlin Multiplatform
summary
A Kotlin Multiplatform library is built to fetch images used at Mixtiles and it actually produces an Android AAR and an iOS framework, but Xcode integration and Gradle wiring require manual steps. The code shares networking, coroutines, and SQL with Ktor, kotlinx.serialization and SQLDelight and uses expect/actual for platform hooks. Tests run on the JVM common suite, coroutines need platform runBlocking shims, and the shared networking and DB pieces work but iOS ergonomics still need polish.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:12Why is this important
- 4:29How does this work
- 7:11Native vs Multiplatform
- 8:02Platform Specific Decorations
- 8:59Getting Started
- 10:14Project Structure
- 13:17Android Studio
- 14:07Gradle
- 17:35Example
- 19:47Multiplatform libraries
- 23:28Networking code
- 27:25Shared databases
- 29:24Shared presentation logic
- 33:13Running tests from Android
- 34:05Conclusions
- 36:23Collaboration
- 36:54References
related talks
39mAnd That, Folks, is How We Shared Code Between Android, iOS and the Backend
36mIntroducing Kotlin Multiplatform in an existing project
44mShipping a Mobile Multiplatform Project on iOS & Android
34mKotlin Multiplatform: code sharing without compromise
52miOS Architecture with Multiplatform
40mKotlin goes global
27mAn Android Dev start to Kotlin Multiplatform
31mKotlin Multiplatform for iOS: Myths vs Reality
