Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kashif-e/kmptemplate
A KMP Template targeting Multiplatform Compose Android, IOS and Desktop. Get started with zero effort.
https://github.com/kashif-e/kmptemplate
compose compose-desktop compose-ios ios jetpack jetpack-compose kmm kmp kotlin kotlin-multiplatform multiplatform-compose
Last synced: 7 days ago
JSON representation
A KMP Template targeting Multiplatform Compose Android, IOS and Desktop. Get started with zero effort.
- Host: GitHub
- URL: https://github.com/kashif-e/kmptemplate
- Owner: Kashif-E
- License: mit
- Created: 2023-02-14T17:19:00.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T07:39:49.000Z (over 1 year ago)
- Last Synced: 2025-01-16T09:32:11.996Z (14 days ago)
- Topics: compose, compose-desktop, compose-ios, ios, jetpack, jetpack-compose, kmm, kmp, kotlin, kotlin-multiplatform, multiplatform-compose
- Language: Kotlin
- Homepage:
- Size: 147 KB
- Stars: 246
- Watchers: 7
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# KMPTemplate
Featured in Kotlin weekly and Kotlin weeekly
The KMPTemplate is designed to help developers build applications for three platforms:
- Android
- iOS
- Desktop
This is built to reduce the effort of configuring all the targets together such as Compose for Ios which currently does not have an ios target when creating a new compose multiplatform project using intellij idea.
![Screenshot 2023-02-14 at 8 06 39 PM](https://user-images.githubusercontent.com/61690178/218813583-2c7a2ef9-4b42-4095-b5a6-7a6d5417bbf9.png)
# How it works?
KMPTemplate leverages the power of Kotlin Multiplatform and Compose Multiplatform to create a unified codebase for all target platforms. Here's how it works for each platform:
-
Android: Runs natively on Android devices. -
iOS: Utilizes UIKit under the hood for seamless integration with iOS devices. -
Desktop: Employs the Skia Library to provide native-like performance on desktop platforms.
# Template Features
The KMPTemplate comes with several preconfigured features to accelerate your development process:
- Version Catalogs
- Compose Multiplatform
- Koin for dependency injection
- Ktor for networking
- Kotlin serialization
- Multiplatform image viewer
# Is it production-ready?
KMPTemplate can be considered both production-ready and not production-ready, depending on your requirements. You can use the UIControllers generated by Compose alongside SwiftUI or UIKit to share the UI across platforms. For platform-specific features like camera and sensors, you can utilize SwiftUI or UIKit.
If you have any suggestions or find a bug, please add it to the issues.
# Troubleshooting
## MacOS on Apple Chip (M1/M2)
If you encounter the error 'pod install' command failed with code 1. run the following commands in the terminal:
```bash
sudo softwareupdate --install-rosetta --agree-to-license
```
```bash
sudo gem uninstall ffi && sudo gem install ffi -- --enable-libffi-alloc
```