Hello, I have a pet project that I'm using to lear...
# koin
a
Hello, I have a pet project that I'm using to learn KMP, it's a basic Android/iOS app with a
shared
module in charge of the network part using Koin
4.0.1
for DI, Android is working ok, but iOS is throwing this error message:
Copy code
shared.KoinInitHelper#initKoin(){}. The file path does not exist on the file system: /<compiler-generated>
Not sure why the error happens, any idea how to solve this? code in 🧵
I have this class in
iosMain
Copy code
class KoinInitHelper : KoinComponent {
    private val appCoroutineDispatchers: AppCoroutineDispatchers by inject()
    private val repository: DogRepository by inject()

    fun appCoroutineDispatchers(): AppCoroutineDispatchers = appCoroutineDispatchers
    fun dogRepository(): DogRepository = repository

    fun initKoin() {
        startKoin {
            modules(sharedDomainModule, sharedNetworkModule)
        }
    }
}
and this in the main view of the iOS app:
Copy code
import SwiftUI
import Shared

@main
struct dogifyApp: App {
    
    init() {
        KoinInitHelper().doInitKoin()
    }
    
    var body: some Scene {
        WindowGroup {
            HomeView()
        }
    }
}
I also tried leaving the
initKoin
method outside the class and calling that with
KoinInitHelperKt.doInitKoin()
but I'm getting the same error
Already fixed, the issue was that I was using a wrong version of Kotlin 😅
😅 1