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

May be an option to Make @KoinViewModel default as @Factory on Not Android Platfrom #1967

Open
mny459 opened this issue Sep 6, 2024 · 0 comments

Comments

@mny459
Copy link

mny459 commented Sep 6, 2024

When use Koin on a KMP project with native ui on both android and ios.

I always use annotation, but when I use @KoinViewModel in shared code. It will not work.

I have to write di code on both android and ios like this

Android actual

viewModelOf(::ArchivedBookViewModel)

iOS actual

factoryOf(::ArchivedBookViewModel)

So is there any option to make @KoinViewModel default as @factory on Not Android Platfrom. So I do not need to write more di code. It's really easy to forget.

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

1 participant