This is a Kotlin Multiplatform project targeting Android, iOS, Desktop. This Kotlin Multiplatform (KMP) project showcases how to build a truly cross-platform application using Jetpack Compose, SwiftUI, Ktor, and MVVM architecture. The app supports Android, iOS, and Desktop platforms, making use of the latest technologies like Flows for state management, and network calls using Ktor. Additionally, it implements efficient image loading across all platforms.



- Mixed UIs - Jetpack Compose and Swift UI.
- Jetpack Compose for Android, iOS, and Desktop UI
- Partial SwiftUI for iOS UI (bottomsheet only)
- Ktor for making network calls
- MVVM architecture
- Image loader for cross-platform image handling
- Shared business logic for all platforms
- Kotlin Multiplatform (KMP): Shared codebase across platforms
- Jetpack Compose: Declarative UI framework for Android
- SwiftUI: Declarative UI framework for iOS
- Ktor: Networking library for making HTTP requests
- MVVM Architecture: Ensures separation of concerns and easy scalability
- Compose ImageLoader: For image loading on Android and iOS respectively
The app demonstrates:
- Fetching data from network using Ktor.
- Displaying data in Jetpack Compose, SwiftUI.
- Image loading optimized for each platform.
Feel free to submit issues, fork the repository, and send pull requests. Contributions are always welcome!
-
/composeApp
is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:commonMain
is for code that’s common for all targets.- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app,
iosMain
would be the right folder for such calls.
-
/iosApp
contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
Learn more about Kotlin Multiplatform…