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
Describe the bug
Hi I have this error in my Compose Multiplatform Project with iOS:
InstanceCreationException: Could not create instance for '[Factory: 'com.uniciti.sos.storage.api.SaveUserLocationUseCase']'
commonMain:
expect class PlatformLocationService {
suspend fun start(locationServiceConfig: LocationServiceConfig = LocationServiceConfig())
suspend fun stop()
}
androidMain:
actual class PlatformLocationService(
private val context: Context
) {
actual suspend fun start(
locationServiceConfig: LocationServiceConfig
) { ... }
actual suspend fun stop() { ... }
}
iosMain:
actual class PlatformLocationService : KoinComponent {
private val saveUserLocationUseCase: SaveUserLocationUseCase by inject()
actual suspend fun start(
locationServiceConfig: LocationServiceConfig
) {...}
actual suspend fun stop() {... }
}
I have a shared module beacuse I need background service location in both platforms:
commonMain: expect fun getSharedLocationModule(): Module
iosMain:
actual fun getSharedLocationModule(): Module = module {
factory { PlatformLocationService() }
factory { PlatformNotificationManager() }
}
I have a single module in commonMain of composeApp:
fun appModules() = listOf(
getSharedLocationModule()
)
Describe the bug
Hi I have this error in my Compose Multiplatform Project with iOS:
InstanceCreationException: Could not create instance for '[Factory: 'com.uniciti.sos.storage.api.SaveUserLocationUseCase']'
commonMain:
androidMain:
iosMain:
I have a shared module beacuse I need background service location in both platforms:
commonMain:
expect fun getSharedLocationModule(): Module
iosMain:
I have a single module in commonMain of composeApp:
And finally I have my composable ui:
This only happens when I have dependencies injected into the impl classes:
Please help me, I new in KMP 😆
The text was updated successfully, but these errors were encountered: