Tal Zion
06/04/2025, 8:26 AMclass AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
doInitKoin(config: nil)
FirebaseApp.configure()
return true
}
}
This is the common implementation
Modules.kt
expect val platformModule: Module
val commonModule = module {
singleOf(::RemoteFirebaseRepository).bind<FirebaseRepository>()
}
KoinHelper.kt
// Common App Definitions
fun appModule() = listOf(commonModule, platformModule)
fun initKoin(config: KoinAppDeclaration? = null) {
// Initialize Koin with the platform-specific module
startKoin {
config?.invoke(this)
modules(appModule())
}
}
Any help if highly appriciated