Spotify-KMP is a Kotlin Multiplatform sample that mirrors the architecture of a production-level app!
Spotify-KMP Tech stack & Open-source libraries
- Minimum SDK level
- Android 21
- iOS 15
- UI Framework
- Coroutines + Flow for asynchronous.
- Ktor: HTTP Client Franework for REST Apis.
- SKIE: SKIE is a tool for Kotlin Multiplatform development that enhances the Swift API published from Kotlin.
- KMMBridge: KMMBridge is a set of Gradle tooling that facilitates publishing and consuming pre-built KMM Xcode Framework binaries.
- Kotlinx.serialization: A modern JSON serialization library for Kotlin.
- Coil: Loading and caching images images from network (Android).
- Kingfisher: Loading and caching images images from network (Ios).
- Kermit: Multiplatform centralized logging utility.
- Paging3: Multiplatform Paging Library
- Multiplatform-Settings: Multiplatform library for saving simple key-value data (SharedPreferences / NSUserDefaults)
- BuildKonfig: BuildConfig for Kotlin Multiplatform Project + Product Flavour in Shared Module
- Koin : A pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
- Store : A Kotlin Multiplatform library for building network-resilient applications (Build offline first apps)
- SqlDelight: Multiplatform SQLite Database (Generates typesafe Kotlin APIs from SQL)
- Playlist + Album Listing on HomePage
- Track listing inside playlist & album
- Paging Support in track listing screen using Paging3
- Loading / Error footer support while paging + retry functionlity in listing (supported in both android & ios)
- Offline first (Load from in-memory cache -> disk -> network) using Store
- Multi module support in android & shared modules
- Better support for suspend + flows + sealed classes using SKIE
- Publish IOS Binary as POD framework using KMMBridge
- BuildConfig + Product Flavour inside shared module using BuildKonfig
- Dependency injection using Koin
- Database caching using SqlDelight
- Access/Refresh Token functionality using Ktor Auth Plugin
Spotift-KMP adopted modularization strategies below:
- Reusability: Modulizing reusable codes properly enable opportunities for code sharing and limits code accessibility in other modules at the same time.
- Parallel Building: Each module can be run in parallel and it reduces the build time.
- Strict visibility control: Modules restrict to expose dedicated components and access to other layers, so it prevents they’re being used outside the module
- Decentralized focusing: Each developer team can assign their dedicated module and they can focus on their own modules.
NOTE: The same modularization strategies are used for shared module as well
For more information, check out the Guide to app modularization.
- Shared resource support using moko-resources
- MultiModule structure in iOS project
- Test cases for the common code
Mobile App Development Trends – 29.02
Working with dates and Codable, Fun with shapes in Compose, The missing guide to deep linking and more!
The open source StarCoder 2 model runs on regular GPUs
Companies are making more and more artificial intelligence-based code generators at an astonishing rate – services like GitHub Copilot and...
Google TV updates the homescreen
You may notice your apps taking a different shape on your Google TV For You screen.
Decompose – Kotlin Multiplatform lifecycle-aware business logic components with routing and pluggable UI
Decompose is a Kotlin Multiplatform library for breaking down your code into tree-structured lifecycle-aware business logic components (aka BLoC), with...
Mobile App Development Trends – 28.02
How to use VariadicView, Comprehensive Guide To Kotlin Context Receiver, OWASP Mobile Top 10 and more!
GitHub opens access to Copilot Enterprise
Copilot Enterprise includes all the features of the existing Business plan, including intellectual property indemnification, but extends it with a...