You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was looking at your ViewModel by using the KoinComponent to inject the repository, so in iOS you will not have to pass any parameter to ViewModel for initialization.
I have another workaround for this which makes it possible to pass a repository as a parameter using the KoinPlatform :
Hi, I was looking at your ViewModel by using the KoinComponent to inject the repository, so in iOS you will not have to pass any parameter to ViewModel for initialization.
I have another workaround for this which makes it possible to pass a repository as a parameter using the KoinPlatform :
https://github.com/alirezaeiii/TMDb-KMM/blob/main/shared/src/commonMain/kotlin/org/example/tmdb/di/Koin.kt
So in iOS you can init ViewModel using the above helper function using KoinKt.getViewModel() :
https://github.com/alirezaeiii/TMDb-KMM/blob/main/iosApp/iosApp/ContentView.swift
Do you think which approach is preferable and why? Since you have extensive experience in KMM.
The text was updated successfully, but these errors were encountered: