Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IosMain does not see generated code in Build folder. #428

Open
Monabr opened this issue Sep 6, 2024 · 3 comments
Open

IosMain does not see generated code in Build folder. #428

Monabr opened this issue Sep 6, 2024 · 3 comments

Comments

@Monabr
Copy link

Monabr commented Sep 6, 2024

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?

@evant
Copy link
Owner

evant commented Sep 6, 2024

Have you taken a look at https://github.com/evant/kotlin-inject-samples/tree/main/multiplatform/greeter? It's our sample for multiplatform setup

@Monabr
Copy link
Author

Monabr commented Sep 6, 2024

@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

@evant
Copy link
Owner

evant commented Sep 7, 2024

It's detailed in https://github.com/evant/kotlin-inject/blob/main/docs/multiplatform.md but yes the docs can use improvements #389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants