(project is in progress now) 🛠️
- Kotlin Multiplatform - multiplatform technology
- Ktor - for network
- Multiplatform-Settings - to store key-value settings
- SqlDelight - for database
- JsonPlaceholder - as backend api
androidApp
,iosApp
: default KMP-project Android and iOS appscore:network
: core module for network callscore:storage
: core module with databasecore:settings
: core module for store key-value settings (like SharedPreferences/UserDefaults)core:memorycache
: core module for store key-value data in app-single MemoryCache (in RAM)sharedumbrella
: KMP module that connectscore:*
modules withshared
module (for Android) and XCFramework (for iOS) (Umbrella)shared
: default KMP module that providessharedumbrella
andother future modules and logic
to Android app (iOS native app uses onlysharedumbrella
module as XCFramework)
Just run "androidApp" configuration as usual in Android Studio (or other IDE) 😇
- Open any Terminal (or Android Studio/other IDE). You will need "./gradlew" command possibility
- Set execution flag for "gradlew" by terminal command: chmod +x gradlew
- Build XCFramework for module "sharedumbrella" by terminal command: ./gradlew :sharedumbrella:assembleXCFramework
- Open Xcode project iosApp (or any your iOS native project)
- Add (by drag-n-drop) built framework (sharedumbrella/build/XCFrameworks/.../sharedumbrella.xcframework) to Xcode project iosApp -> General -> Frameworks, Libraries, and Embedded Content
- You are amazing! Just "import sharedumbrella" anywhere and enjoy! 😇
(note that this steps are creates external-path dependency (built XCFramework is outside of iosApp folder). You can copy generated XCFramework to iOS project folder if you want)