Kotlin 多平台移动端范例

This is a curated list of cross-platform mobile projects created with Kotlin Multiplatform.

You can find even more sample projects on GitHub, see the kotlin-multiplatform-mobile topic.

If you want to add your Kotlin Multiplatform project to this topic and help the community, follow the instructions in the GitHub documentation.

Sample name What's shared? Popular libraries used UI Framework iOS integration Platform APIs Tests Features
Kotlin Multiplatform Mobile Sample Algorithms - XML, SwiftUI Xcode build phases -
  • expect/actual declarations
  • KMM RSS Reader Models, Networking, Data Storage, UI State SQLDelight, Ktor, DateTime, multiplatform-settings, Napier, kotlinx.serialization Jetpack Compose, SwiftUI Xcode build phases -
  • Redux for sharing UI State
  • Published to Google Play and App Store
  • kmm-ktor-sample Networking Ktor, kotlinx.serialization, Napier XML, SwiftUI Xcode build phases - -
  • Video tutorial
  • todoapp Models, Networking, Presentation, Navigation and UI SQLDelight, Decompose, MVIKotlin, Reaktive Jetpack Compose, SwiftUI Xcode build phases -
  • 99% of the code is shared
  • MVI architectural pattern
  • Shared UI across Android, Desktop and Web via Compose Multiplatform
  • mpp-sample-lib Algorithms - - - -
  • Demonstrates how to create a multiplatform library (tutorial)
  • KaMPKit Models, Networking, Data Storage, ViewModels Koin, SQLDelight, Ktor, DateTime, multiplatform-settings, Kermit Jetpack Compose, SwiftUI CocoaPods - -
    PeopleInSpace Models, Networking, Data Storage Koin, SQLDelight, Ktor Jetpack Compose, SwiftUI CocoaPods, Swift Packages -

    Target list:

  • Android Wear OS
  • iOS
  • watchOS
  • macOS Desktop (Compose for Desktop)
  • Web (Compose for Web)
  • Web (Kotlin/JS + React Wrapper)
  • JVM
  • D-KMP-sample Networking, Data Storage, ViewModels, Navigation SQLDelight, Ktor, DateTime, multiplatform-settings Jetpack Compose, SwiftUI Xcode build phases -
  • Implements the MVI pattern and the unidirectional data flow
  • Uses Kotlin's StateFlow to trigger UI layer recompositions
  • Food2Fork Recipe App Models, Networking, Data Storage, Interactors SQLDelight, Ktor, DateTime Jetpack Compose, SwiftUI CocoaPods - - -
    Bookshelf Models, Networking, Data Storage Realm-Kotlin, Ktor, kotlinx.serialization Jetpack Compose, SwiftUI CocoaPods - -
  • Uses Realm for data persistence
  • Notflix Models, Networking, Caching, ViewModels Koin, Ktor, Multiplatform settings, kotlinx.coroutines, kotlinx.serialization, kotlinx.datetime, Napier Jetpack Compose-Android, Compose Multiplatform-Desktop - -
  • Modular architecture
  • Runs on desktop
  • Sharing viewmodel