kotlin-inject
kotlin-inject copied to clipboard
IosMain does not see generated code in Build folder.
Hi.
AndroidMain generates and uses it component, but iosMain generates component but does not see it from build folder so it can not use it and ios project does not compile with error: Unresolved reference 'create'
How to fix this issue?
Have you taken a look at https://github.com/evant/kotlin-inject-samples/tree/main/multiplatform/greeter? It's our sample for multiplatform setup
@evant The problem was solved after in iosMain in file with my IosCompoment I wrote
@KmpComponentCreate
expect fun IosCompoment.Companion.create(): IosCompoment
I believe docs should highlight this moment for iosMain
It's detailed in https://github.com/evant/kotlin-inject/blob/main/docs/multiplatform.md but yes the docs can use improvements https://github.com/evant/kotlin-inject/issues/389