Has anyone built a Kotlin mutliplatform library/SD...
# multiplatform
r
Has anyone built a Kotlin mutliplatform library/SDK for use in a React Native app? I've gotten it working with the Expo Modules API (https://docs.expo.dev/modules/get-started/) but the DX is pretty poor -- it requires creating code in both Kotlin and Swift that wraps the library (though perhaps this can be partially abstracted away with some multiplatform code), and getting any complex type (like a Flow) across the native/JavaScript boundary seems non-trivial. https://github.com/voize-gmbh/reakt-native-toolkit looked very promising as it allows annotating React methods in common code, supports Flows, and automatically creates the appropriate bridge code for both Android and iOS, BUT I haven't been able to get it to work. No matter what I do -- even just running the example in the source without any changes -- I either run into a compiler
IllegalStateException
with a not found error on a klib (which I suspect is due to https://youtrack.jetbrains.com/issue/KT-52600) or a dependency not found error on the ksp processor.