Hey everyone, I cannot seem to get koin annotation...
# koin
r
Hey everyone, I cannot seem to get koin annotations working with expect/actual classes. The sample app is here. The setup is very simple:
Copy code
@Single
expect class MyClass() (Common)

@Single
actual class MyClass actual constructor() (Android/ios)
I have tried multiple variations - expect actual module, try defining the dependency in the module but nothing seems to work. What is the correct way for this? Thanks!
📍 1
Why would something like this not work? 🤔
Copy code
@Module
class MyModule {
    @Single
    fun provideMyClass() = MyClass()
}

//expect - common
expect class MyClass()

//actual - android/ios
actual class MyClass actual constructor()
p
@Ruben Quadros can you post the error log this is not much of a help right now
r
Here you go
Copy code
[ksp] --> Missing Definition for property 'myClass : io.github.rubenquadros.scratchpadkmm.MyClass_Expect' in 'io.github.rubenquadros.scratchpadkmm.MainViewModel'. Fix your configuration: add definition annotation on the class.
Hey @Pedro Alberto, did you get a chance to look at this?