Hey guys i am trying to communicate between kmm mo...
# multiplatform
v
Hey guys i am trying to communicate between kmm module and application. I tried to implement interface. In androidMain
Copy code
actual class Platform actual constructor() {
     actual val versionCode = AppConfig.versionCode
}

interface AppConfig {
    val versionCode: String
}
But I am getting error
g
AppConfig
refers to the interface, not an implementation. So you're trying to access the value of an interface (and you should retrieve value from an instance of a class).
v
So how can I fix that?
okk sure thanks
g
Here I've no idea what you're trying to achieve exactly. Creating a new KMP project from IntelliJ already have a expect/actual example very similar to your example.
v
okk
j
Probably the best example across different applications is John O'Reilly, so look through his repo and it may help you understand more. https://github.com/joreilly