Example of application using Kotlin Multiplatform and MVVM pattern for both platforms (Android & iOS) and FirestoreKMP to get data from Firebase. To achieve it the libraries used are:
- FirestoreKMP: Library wrapping the Firestore SDK for Kotlin Multiplatform with clients for Android and iOS. Shared common code can run methods that get delegated to the platform specific SDKs.
- moko-mmvm: This is a Kotlin Multiplatform library that provides architecture components of Model-View-ViewModel for UI applications. Components are lifecycle-aware on Android.
- Serialization: to De/Serializing JSON
- Kodein-DI: Dependency injector
- kotlinx.coroutines: Library support for Kotlin coroutines with multiplatform support
If you want to know a bit more without checl all the code, you can take a look at this post on ProAndroidDev.com: https://proandroiddev.com/kotlin-multiplatform-firebase-mvvm-4cdcddd98893