https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sylvain Patenaude

01/09/2020, 6:23 PM
Anyone who would have a simple example (or link to it) of a React Native app calling a Kotlin Multiplatform library? Looking on the web for it, but haven't found exactly what I'm looking for yet. (NOTE: I'm just starting with React Native, I don't have any experience.) EDIT: I have 2 libraries (.jar for Android, .framework for iOS).
s

Sam

01/09/2020, 9:24 PM
I did a proof of concept a long while back, exposing Kotlin objects to iOS’s JavascriptCore. tl;dr It’s possible but not pleasant due to the garbage collector accessing the objects on a background thread. I have a repo at https://github.com/samus/KnJsTest. Note that the gradle config is outdated as it hasn’t been touched in 10 months. The code is still valid.
3 Views