Here is my iOSApp swift class import SwiftUI impo...
# koin
m
Here is my iOSApp swift class import SwiftUI import sharedKit // no changes in your AppDelegate class class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { AppHelperModuleKt.doInitKoin() print(">> AppHelperModuleKt.doInitKoin() called") return true } } @main struct iOSApp: App { // inject into SwiftUI life-cycle via adaptor !!! @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() } } }
1
m
Use startKoin ^^
m
I did
Copy code
fun initKoin(appDeclaration: KoinAppDeclaration = {}) {
    Logger.d { "initKoin()" }
    startKoin {
        appDeclaration()
        platformModule() + AppHelperModule.getSharedModules()
    }
}

// For iOS only
fun initKoin() = initKoin {}
I found my mistake, it was a bad setup in startKoin block
👍 1
Sorry i bothered you i guess but thank you still 😄