A simple and sample mobile application built to demonstrate the use of Kotlin Multiplatform Mobile for developing Android and iOS applications 🚀.
It simply loads Posts data from API and Posts will be always loaded from Remote data (from API). Features:
- Clean and Simple UI 🎨
Currently, the app looks like this on the both platforms:
This is a sample KMM project which tries to shares as much as code possible between Android and iOS.
Android App | iOS App |
---|---|
- Kotlin: Programming language
- Kotlin Multiplatform: For building multi-platform applications in the single codebase.
- Jetpack Compose/SwiftUi (https://developer.apple.com/xcode/swiftui/): Build Native UI i.e. Android and iOS in this project.
- Kotlinx
- Coroutines: For multithreading
- Serialization: For JSON serialization/deserailization
- Ktor Client: Performing HTTP requests.
- Koin: A pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
This Compose Multiplatform project includes three modules:
This is a Kotlin module that contains the logic common for both Android and iOS applications, the code you share between platforms.
It uses Gradle as the build system. You can add dependencies and change settings in shared/build.gradle.kts
. The shared module builds into an Android library and an iOS framework.
This is a Kotlin module that builds into an Android application. It uses Gradle as the build system. The androidApp
module depends on and uses the shared module as a regular Android library.
This is an Xcode project that builds into an iOS application. It depends on and uses the shared module as a CocoaPods dependency.
Copyright 2024 Ramarao Kotu
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.