
Shared UI components and scaffolding for cross-platform apps, common/target-specific source layout, Koin DI bootstrap, sample app and build/run guidance, modularization helpers.
This is a Kotlin Multiplatform project targeting Android, iOS.
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
/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.
IMPLEMENTATION
commonMain.dependencies {
implementation("io.github.baudelioandalon:kmmuicore:+")
}
DONT FORGET Steps to init KoinDependencies
Create a new Kotlin file in CommonMain/di
import com.borealnetwork.kmmuicore.di.initKoin
import org.koin.core.KoinApplication
fun koinInjection(appDeclaration: KoinApplication.() -> Unit = {}) {
initKoin().also {
appDeclaration(it)
//if your had another koin Dependencies add modules here
}
}
In your iOSApp.swift
init() {
KoinHelperKt.koinInjection(appDeclaration:{ _ in })
}
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
./gradlew :composeApp:assembleDebug.\gradlew.bat :composeApp:assembleDebugTo build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Learn more about Kotlin Multiplatform…
This is a Kotlin Multiplatform project targeting Android, iOS.
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
/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.
IMPLEMENTATION
commonMain.dependencies {
implementation("io.github.baudelioandalon:kmmuicore:+")
}
DONT FORGET Steps to init KoinDependencies
Create a new Kotlin file in CommonMain/di
import com.borealnetwork.kmmuicore.di.initKoin
import org.koin.core.KoinApplication
fun koinInjection(appDeclaration: KoinApplication.() -> Unit = {}) {
initKoin().also {
appDeclaration(it)
//if your had another koin Dependencies add modules here
}
}
In your iOSApp.swift
init() {
KoinHelperKt.koinInjection(appDeclaration:{ _ in })
}
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
./gradlew :composeApp:assembleDebug.\gradlew.bat :composeApp:assembleDebugTo build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Learn more about Kotlin Multiplatform…