Kotlin Help

Samples

This is a curated list of Kotlin Multiplatform Mobile (KMM) samples.

Do you have a great idea for a sample, or one you would like to add to the list?
Feel free to reach out to us and tell us about it!

Sample name

What's shared?

Popular libraries used

UI Framework

iOS integration

Platform APIs

Tests

JS target

Features

kmm-basic-sample

Algorithms

-

XML, SwiftUI

Xcode build phases

-

-

  • expect/ actual declarations

kmm-production-sample

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

KaMPKit

Models, Networking, Data Storage, ViewModels

Koin, SQLDelight, Ktor, DateTime, multiplatform-settings, Kermit

Jetpack Compose, SwiftUI

CocoaPods

-

-

-

moko-template

Models, Networking, Data Storage, ViewModels

Moko Libraries, Ktor, multiplatform-settings

-

CocoaPods

-

-

  • Modular architecture

  • Shared features: Resource management, Runtime permissions access, Media access, UI lists management

  • Network layer generation from OpenAPI.

PeopleInSpace

Models, Networking, Data Storage

Koin, SQLDelight, Ktor

Jetpack Compose, SwiftUI

CocoaPods, Swift Packages

-

  • Android Wear OS

  • iOS

  • watchOS

  • macOS Desktop (Compose for Desktop)

  • Web (Compose for Web)

  • Web (Kotlin/JS + React Wrapper)

  • JVM

GitFox SDK

Models, Networking, Interactors

Ktor

XML, UIKit

Xcode build phases

-

-

  • Integrated into Flutter app

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-KMM

Models, Networking, Data Storage, Interactors

SQLDelight, Ktor, DateTime

Jetpack Compose, SwiftUI

CocoaPods

-

-

-

-

kmm-ktor-sample

Networking

Ktor, kotlinx.serialization, Napier

XML, SwiftUI

Xcode build phases

-

-

-

Currency Converter Calculator

Models, Networking, Data Storage, Algorithms, ViewModels

Ktor, SQLDelight, koin, moko-resources, kotlinx.datetime, multiplatform-settings

XML, SwiftUI

CocoaPods

-

  • Logic shared with the backend

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

kmm-arch-demo

Models, Networking, ViewModels, UI State

Ktor, kotlinx.serialization

XML, SwiftUI

CocoaPods

-

-

-

  • Uses Arch, a KMM library that is based on Spotify’s Mobius library but uses SharedFlow, StateFlow and coroutines instead of RxJava

Codeforces WatchR

Models, Networking, Data Storage, UI State

SQLDelight, Ktor, kotlinx.serialization

XML, UIKit

CocoaPods

-

  • Uses Redux (ReKamp) for sharing UI State

  • Published to Google Play and App Store

kmm-with-cocoapods-sample

-

-

-

CocoaPods

-

-

-

kmm-with-cocoapods-multitarget-xcode-sample

-

-

-

CocoaPods

-

-

-

-

mpp-sample-lib

Algorithms

-

-

-

-

  • Demonstrates how to create a multiplatform library (tutorial)

Last modified: 05 October 2021