The app is available on Google Play and App Store:
Warning Writing and running iOS-specific code for a simulated or real device requires macOS. This is an Apple limitation.
Check your environment has all requirements for Kotlin Multiplatform Mobile Development:
- The computer must be running latest macOS.
- Xcode
- Android Studio
- Kotlin Multiplatform Mobile plugin
- CocoaPods
Before opening the project in Android Studio, use kdoctor
to ensure your development environment is configured correctly. Install kdoctor
via brew
:
brew install kdoctor
The kdoctor tool will check your environment and provide a list of errors if something goes wrong:
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✓] Cocoapods
Conclusion:
✓ Your system is ready for Kotlin Multiplatform Mobile Development!
Check you have installed Kotlin Multiplatform Mobile plugin
To view the project structure use Project view.
The project has three modules:
The module contains code that will be shared across all platforms.
App @Composable
фукція знаходиться в shared/src/commonMain/kotlin/App.kt
.
The module contains code that will be used only on Android.
The module contains code that will be used only on iOS.
The module iosApp
depends on the shared
module as a CocoaPods dependency.
Chose the configuration androidApp
-> Run
Or run by gradle command
./gradlew installDebug
Before run the mixdrinks project for ios, we highly recommend to run the Hello, World
Xcode
project. Just to be sure that your environment is ready for ios development.
Chose the configuration iosApp
-> Run
Before run the app on real ios device you need to prepare your environment:
- Create an Apple ID
- Register your iphone in Xcode
Change the TEAM_ID
to your team id (can be found in apple.developer),
in iosApp/Configuration/Config.xcconfig
Alternatively way to get team id, use kdoctor command kdoctor --team-ids
. The command will produce
the list of team ids from your system, choose the one you prefer.
We are happy to accept small and large contributions, you can just make changes and create a pull, or you can check our issue tab and choose the one you like.
If you have any problems with the project, please check the following list:
Usually happens after you make change is some ios specific files,
like iosApp/Configuration/Config.xcconfig
or iosApp/Info.plist
Close Android Studio or you idea. Than run the ./cleanup.sh
. Now you can open the project
again.
After you maker changes into resources into shared
module, you need to run pod install
in
the iosApp
folder.