This is a Kotlin Multiplatform project targeting Android, iOS
![2](https://private-user-images.githubusercontent.com/34120686/309346775-4fc6f30d-1828-4668-b3e0-ad046ddd9bc0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1Mzg0NjYsIm5iZiI6MTcyNDUzODE2NiwicGF0aCI6Ii8zNDEyMDY4Ni8zMDkzNDY3NzUtNGZjNmYzMGQtMTgyOC00NjY4LWIzZTAtYWQwNDZkZGQ5YmMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDIyMjI0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFmZWYxMDhiZjJlYjE1OWJmMmRiZDgxNDM1YjY5NWE0OWI0NTc3ODAxMmJjMmI5MjFjYmUyMDJjMjgzMjBlZjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SZQG-y_nCnjKGILV5MUQnAFIxwxLJRIGfIDeDaSuqsE)
![3](https://private-user-images.githubusercontent.com/34120686/309349101-44ea5136-8053-4027-9cf4-f9dcc8cfc84b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1Mzg0NjYsIm5iZiI6MTcyNDUzODE2NiwicGF0aCI6Ii8zNDEyMDY4Ni8zM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lnbmF0dXJlPWY3MjIzYTk1NWY1MTgyNjExYjQ2NjM0NGVlMDkxZDI0MTEyMjA1MDg0N2JlNjk4OTk2OGM0ZWU0MjkzMjY2MjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gOybzaVanB-XV-gIl1gf_X26ThKKV1rmoSA6rUWOIaA)
Architecture: Clean Architecture, Domain-Driven Design, MVI.
Shared View Model: Utilizing the KMM-ViewModel library for sharing business logic.
Ktor for efficient networking. Koin for dependency injection.
Swift UI: Crafting iOS-specific screens with Swift UI for native iOS experiences.
Navigation System: Implementing custom navigation graphs for Swift UI screens.
StateFlow & SharedFlow Publisher: Implementing StateFlow and SharedFlow publishers to observe changes from the ViewModel.
Compose: Creating Android-specific screens with Jetpack Compose for modern UI development.
Navigation System: Compose Navgraph
Compose Multiplatform: Utilizing Compose Multiplatform to share screens between Android and iOS.
-
/composeApp
is for code that will be shared across your 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. -
/shared
is for the code that will be shared between all targets in the project. The most important subfolder iscommonMain
. If preferred, you can add code to the platform-specific folders here too.
//notice
You can open the web application by running the :composeApp:wasmJsBrowserDevelopmentRun
Gradle task.
if your ios project didn't find the shared module "import shared" according to this https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/
In the Xcode, Run Script build step, change packForXcode to embedAndSignAppleFrameworkForXcode and remove all the passed flags. The task will use the Xcode environment configuration and build only the needed artifact automatically.
this is mine
./gradlew :composeApp:embedAndSignAppleFrameworkForXcode
./gradlew :shared:embedAndSignAppleFrameworkForXcode