Hi should `koinInject` work in compose multiplatfo...
# koin
s
Hi should
koinInject
work in compose multiplatform for desktop? I have my app running in Android/iOS/Desktop and everything works for Android, iOS but not for desktop;
it crashes with No definition found for type ... Check your Modules configuration error
right after
./gradlew :desktop:run
command. Has anybody encountered the same issue?
b
So I just saw in that above article about koinInject() so I was just updating my app right now in the spots I was using get(), and I can confirm it still works on desktop after changing the composables to use koinInject()
I'd make sure you're starting koin in the right spot. This is the very first thing for my desktop main function
Copy code
fun main() = application {

    startKoin {
        modules(appModule())
    }
...
}
s
Thanks Ben! There were actually two mistakes I made
1. Illegal call of
startKoin
function - I did not call it so that was one 2. Missing coroutines-swing dependency - as described here I did not have this necessary dependency https://stackoverflow.com/a/78509710/5449688 Anyway thanks for your help!
👍 1
👍🏾 1
b
Awesome, glad you're up and running now!
❤️ 1
android eyes 1