Open AlexBurdu opened 3 months ago
As far as I can tell by exploring the generated sources, the problem is with what is being generated in the Inject component class.
On the left we can see the one generated for iosSimulatorArm64 and on the right the jvm target one.
Ok, by removing the scope from my coroutine scope providers it builds:
@Provides
// @SingletonScope
fun providesBackgroundCoroutineScope(): BackgroundCoroutineScope {
I don't understand why it doesn't build for the iOS target with @Singleton
scope for the provider and is fine for the other targets. Why does is say that the iOS target is not scoped?
Seems like it's not seeing the scope annotation on the component for some reason? How are you declaring it, directly on ApplicationComponent?
Ah, that was it! I didn't have it on the ApplicationComponent
. Thank you! How come the other targets build fine without it?
That's a good question... they should've reported the same error.
I have the
@KmpComponentCreate
annotation set up on an extension in the shared code and it all works fine for Android and jvm, but I can't seem to get it to generate theKmpComponentCreate
for the iOS target. TheInjectApplicationComponent
is generated just fine:Stripped out package id from the screenshot and logs
The directory structure that I'm using is a bit customized, as in I'm not using the default src directories. Unsure if that matters for this error.