kotlin-multiplatform
Installation
SKILL.md
Kotlin Multiplatform (KMP)
Kotlin Multiplatform (KMP) allows you to share code between Android, iOS, Web, and Desktop. It emphasizes sharing logic (Business, Data, Networking) while allowing for native or shared (Compose Multiplatform) UIs.
When to Use
- Sharing complex business logic and data layers between mobile platforms.
- Building a "Super App" SDK to be used by other native apps.
- Teams with strong Kotlin expertise wanting to target iOS.
- Sharing UI code via Compose Multiplatform (stable for iOS in 2025).
Quick Start
// commonMain/kotlin/Platform.kt
interface Platform {
val name: String
}
expect fun getPlatform(): Platform