Search code examples
kotlin-multiplatformkotlin-native

Kotlin native - share networking, sqlite database and logic between ios and android


I am trying to share code between iOS and Android and looking at Kotlin. Is it possible to do sqlite database access, parallel network calls api calls, json parings and some algorithms in Kotlin Native and Kotlin Multiplatform?

I have test project with Flutter/Dart where it works but I would prefer to use Kotlin.

Thanks


Solution

  • try https://github.com/icerockdev/moko-template/ - here sample with network, serialization, shared business logic, storage.
    for database use https://github.com/cashapp/sqldelight
    multithreading can be done with https://github.com/Autodesk/coroutineworker (if you want coroutines) or https://github.com/badoo/Reaktive (if you want Rx)