Replies: 1 comment
-
A recent (2023) example, illustrating how C++ functions can be called from Kotlin via the jni bridge and cpp-adapter.cpp file: https://medium.com/@mregnauld/how-to-run-c-code-from-a-native-android-or-ios-app-265cad775ed5 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Running
npx create-react-native-library@latest <new module name>
and choosing the options:Native module
>C++ for Android & iOS
>Vanilla
results in the Android kotlin code:As far as I understand, this is calling
a * b
in Kotlin, rather than the C++ function that is meant to be called (i.e.module-name::multiply(a, b)
, incpp/module-name.cpp
.The swift code, in contrast, does call the C++ code.
Shouldn't the kotlin example call the C++ code, too?
Beta Was this translation helpful? Give feedback.
All reactions