A walkthrough of integrating kotlin-inject, a compile-time dependency injection framework, into a Kotlin Multiplatform (KMP) project called BikeShare. Covers shared KMP module setup, Android-specific component creation with Jetpack Navigation and Composable injection using @Assisted, and iOS-specific component usage with SwiftUI and KMP-ObservableViewModel. Contrasts the approach with Koin and shows platform-specific Ktor client engine configuration for both targets.

3m read timeFrom johnoreilly.dev
Post cover image
Table of contents
Common KMP codeAndroidiOSRelated tweet
16 Impressions