I use koin Annotations with Multiplatform.But now ...
# koin
f
I use koin Annotations with Multiplatform.But now it tips error in the iOS target, and it compiles and runs normally in other targets. Did I miss something?
Copy code
error: Unresolved reference 'module'.
I also found the code generated by ksp in the build directory.This is my code:
Copy code
// in iosMain
@Module
object PlatformModule {
}

actual fun KoinApplication.platformModule(): KoinApplication =
    modules(PlatformModule.module)
koin=4.0.1 koin-annotations=1.4.0 kotlin=2.1.0
1
image-1.png,image.png
I now solve this problem by upgrading koin-annotations 2.0.0-Beta3. At the same time, I need to create the expect class in commonMain and add @Module to it.
Copy code
// in commonMain
@Module
expect object PlatformModule

// in iosMain
@Module
actual object PlatformModule