🐦 Kotlin
Advanced
What is Kotlin Multiplatform (KMP)?
Answer
Kotlin Multiplatform allows sharing Kotlin code across multiple platforms — Android, iOS, web, desktop, and server — from a single codebase. The shared code (business logic, networking, data models, repositories) lives in the commonMain source set and compiles to JVM bytecode for Android/JVM, LLVM bitcode for iOS/Native, and JavaScript for web. Platform-specific code uses the expect/actual mechanism. KMP is not a UI framework — it shares logic, not UI. Combine it with Jetpack Compose (Android) and Compose Multiplatform or SwiftUI (iOS) for UI. KMP is production-ready and used by major companies like Netflix and VMware.
Previous
What is CoroutineExceptionHandler in Kotlin?
Next
What is the expect/actual mechanism in Kotlin Multiplatform?