Osman Saral
12/01/2023, 9:03 PMlet iosModule = module {
$0.single { Foo() }
$0.single(named("BASE_URL")) { Config.BASE_URL }
$0.factory { Bar(get()) }
}
initKoin {
modules(iosModule)
}
If it's not possible, are there any workarounds? (On my use case, I need to add BASE_URL from a xcconfig file configuration. Maybe I can find another way to do this but I would like to do what I did on Android side using buildConfig fields)curioustechizen
12/02/2023, 2:22 AMKotlinDependencies
with something like this:
getBaz(nameQualifier: String): Baz = getKoin().get<Baz>(named(qualifier))
And on Swift side where you need an instance, you call it like
KotlinDependencies.shared.getBaz("BASE_URL")
curioustechizen
12/02/2023, 2:23 AMOsman Saral
12/04/2023, 8:10 AMOsman Saral
12/04/2023, 8:11 AM