https://github.com/moatazbadawy/kotrin-kmp
Kotrin is a simple wallpaper app built with Kotlin Multiplatform to targeting IOS and Android. We used Compose Multiplatform, Ktor, Koin, ViewModel, and Room database.
https://github.com/moatazbadawy/kotrin-kmp
android compose-multiplatform coroutines ios kmp koin kotlin kotlin-multiplatform ktor mvvm viewmodel
Last synced: 3 months ago
JSON representation
Kotrin is a simple wallpaper app built with Kotlin Multiplatform to targeting IOS and Android. We used Compose Multiplatform, Ktor, Koin, ViewModel, and Room database.
- Host: GitHub
- URL: https://github.com/moatazbadawy/kotrin-kmp
- Owner: MoatazBadawy
- Created: 2025-01-13T11:43:35.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-22T11:23:26.000Z (4 months ago)
- Last Synced: 2025-03-19T03:16:41.418Z (3 months ago)
- Topics: android, compose-multiplatform, coroutines, ios, kmp, koin, kotlin, kotlin-multiplatform, ktor, mvvm, viewmodel
- Language: Kotlin
- Homepage: https://kotlinconf.com/contest/
- Size: 455 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Kotrin: Wallpapers multiplatform app
Kotrin is a simple wallpaper app built with Kotlin Multiplatform to targeting IOS and Android. We used Ktor, Koin, ViewModel, and Room database. It includes shared business logic, and a shared UI implementation using Compose Multiplatform.
![]()
## How it works
* `/composeApp` is for code that will be shared across all 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.## Project Architecture
## Technologies
The app uses the following multiplatform dependencies in its implementation:
- [Compose Multiplatform](https://jb.gg/compose) for UI
- [Compose Navigation](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-navigation-routing.html)
- [Ktor](https://ktor.io/) for networking
- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) for JSON handling
- [Coil](https://github.com/coil-kt/coil) for image loading
- [Koin](https://github.com/InsertKoinIO/koin) for dependency injection## Set up the environment
> **Warning**
> You need a Mac with macOS to write and run iOS-specific code on simulated or real devices.
> This is an Apple requirement.To work with this template, you need the following:
* A machine running a recent version of macOS
* [Xcode](https://apps.apple.com/us/app/xcode/id497799835)
* [Android Studio](https://developer.android.com/studio)
* The [Kotlin Multiplatform Mobile plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile)
* The [CocoaPods dependency manager](https://kotlinlang.org/docs/native-cocoapods.html)### On Android
To run your application on an Android emulator:
1. Ensure you have an Android virtual device available. Otherwise, [create one](https://developer.android.com/studio/run/managing-avds#createavd).
2. In the list of run configurations, select `androidApp`.
3. Choose your virtual device and click **Run**:Alternatively, use Gradle
To install an Android application on a real Android device or an emulator, run `./gradlew installDebug` in the terminal.
### On iOS
#### Running on a simulator
To run your application on an iOS simulator in Android Studio, modify the `iosApp` run configuration:
1. In the list of run configurations, select **Edit Configurations**:
2. Navigate to **iOS Application** | **iosApp**.
3. In the **Execution target** list, select your target device. Click **OK**:
4. The `iosApp` run configuration is now available. Click **Run** next to your virtual device:#### Running on a real device
You can run your Compose Multiplatform application on a real iOS device for free.
To do so, you'll need the following:* The `TEAM_ID` associated with your [Apple ID](https://support.apple.com/en-us/HT204316)
* The iOS device registered in Xcodedistributed 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.### License
```XML
Designed and developed by 2025 Moataz BadawyLicensed 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 athttp://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.
```