I'm trying out 4.0.1-Beta1 the latest cutting edge...
# koin
k
I'm trying out 4.0.1-Beta1 the latest cutting edge version for Koin. Please help me figure out how to provide platform specific dependencies in a compose multiplatform app. • db module: androidMain:
val androidDbModule = module {  //.. Android specific SQL Driver }
iosMain:
val iosDbModule = module { // ios specific SQL Driver }
• Initialising koin like this in
commonMain
of the
composeApp
module:
KoinApplication(application = koinConfig) {
MyTheme {
MyNavHost()
}
}
koinConfig
provides the modules for commonMain of other modules. Q: How to provide the
androidDbModule
and
iosDbModule
, which are platform specific ?
1
I have been referencing the following project for my project: https://github.com/InsertKoinIO/koin-getting-started/tree/main/ComposeMultiplatform
Creating a expect / actual for Module works fine,
Copy code
expect val sqlDriverModule: Module
1