Hi everyone, I’m trying to extract common code for my app’s data (models, basically just Kotlin data classes) and repository layers.
1/ I’d like to have the data layer available in iOS as a framework generated with Konan, and as a direct dependency in other platforms. I don’t have “expect” declarations there so maybe there’s a way to handle this without multiplatform?
2/ I’d like to share the repository logic (HTTP and Firebase) between the backend (Ktor/JVM), Android and later React JS apps. As I’m going to use specific libraries in each platform for HTTP and Firebase I want to use the expect/actual mechanism here. I’d also like to use Kotlin serialization and coroutines as much as possible. iOS will still have it’s own repository layer written in Swift until Multiplatform supports Kotlin/Native better.
Does this make sense? Has anyone done something similar? How can I make the repository layer depend on the data layer? Thanks!