|
| 1 | +# Fruitties |
| 2 | +Fruitties is a sample app using Kotlin Multiplatform built for Android with Jetpack Compose and iOS with SwiftUI. |
| 3 | + |
| 4 | +<img width="45%" alt="iOS screenshot" src="https://github.com/user-attachments/assets/0bbbe6cc-c992-40c8-8759-08689ff0a900" /> |
| 5 | +<img width="45%" alt="Android screenshot" src="https://github.com/user-attachments/assets/8e0af83a-204f-4d16-874b-79a4bc871c43" /> |
| 6 | + |
| 7 | +## Multiplatform Jetpack Libraries |
| 8 | +This project integrates several Jetpack libraries that are KMP compatible: |
| 9 | + |
| 10 | +- [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) |
| 11 | +- [Room](https://developer.android.com/kotlin/multiplatform/room) |
| 12 | +- [DataStore](https://developer.android.com/kotlin/multiplatform/datastore) |
| 13 | + |
| 14 | +## Running the app |
| 15 | + |
| 16 | +We recommend installing the [Kotlin Multiplatform Plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform) to Android Studio. |
| 17 | +This plugin offers several features to ease the development experience: |
| 18 | + |
| 19 | +- **New project wizard**: Create a new multiplatform project within the IDE. |
| 20 | +- **Preflight checks**: Preflight checks help you configure your environment. |
| 21 | +- **Run configurations**: Run, debug, and test applications on both iOS and |
| 22 | + Android directly from the IDE. |
| 23 | +- **Basic Swift support in the IDE**: Get basic Swift support in the IDE, |
| 24 | + including cross-language debugging tools, navigation and quick |
| 25 | + documentation. |
| 26 | + |
| 27 | +### Android |
| 28 | + |
| 29 | +1. Open the `Fruitties` project in Android Studio |
| 30 | +2. Select the `androidApp` run configuration and run the app <img width="557" height="122" alt="image" src="https://github.com/user-attachments/assets/54019a6a-6877-421a-b195-ddfaf7e4a721" /> |
| 31 | + |
| 32 | +### iOS |
| 33 | + |
| 34 | +With the [Kotlin Multiplatform Plugin](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform) installed, you can run the app from Android Studio. |
| 35 | + |
| 36 | +1. Open the `Fruitties` project in Android Studio |
| 37 | +2. Select the `iosApp` run configuration <img width="623" height="103" alt="image" src="https://github.com/user-attachments/assets/56ff4eb7-f45a-4043-8aca-9733cb59d053" /> |
| 38 | + |
| 39 | +#### Run with Xcode |
| 40 | +Alternatively, you can open this project in Xcode and run it from there: |
| 41 | + |
| 42 | +1. Locate the `iosApp` within the `Fruitties` folder and open it with Finder <img width="762" height="579" alt="image" src="https://github.com/user-attachments/assets/3bdc2dd3-bb01-47b1-81c0-e8e1c0f43991" /> |
| 43 | +2. Open the `iosApp.xcodeproj` <img width="192" height="103" alt="image" src="https://github.com/user-attachments/assets/a933eb69-7d71-44b5-aff0-adcf7931f2db" /> |
| 44 | +3. Build and run the iOS app from Xcode by clicking the Run icon <img width="243" height="42" alt="image" src="https://github.com/user-attachments/assets/a278e57a-7d13-4299-94a8-01ffd6e9e89f" /> |
| 45 | + |
| 46 | +## License |
| 47 | + |
| 48 | +``` |
| 49 | +Copyright 2025 The Android Open Source Project |
| 50 | +
|
| 51 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 52 | +you may not use this file except in compliance with the License. |
| 53 | +You may obtain a copy of the License at |
| 54 | +
|
| 55 | + https://www.apache.org/licenses/LICENSE-2.0 |
| 56 | +
|
| 57 | +Unless required by applicable law or agreed to in writing, software |
| 58 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 59 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 60 | +See the License for the specific language governing permissions and |
| 61 | +limitations under the License. |
| 62 | +``` |
0 commit comments