Description
I'm not sure if I'm missing something obvious but when creating the library template for a Turbo Module using C++ for Android & iOS there is a default example implementing a multiply function. However, on Android the implementation for this function is in Kotlin and it doesn't use the shared C++ library.
When the JS code calls multiply it comes into the code here.
Is there any reason why the OnLoad.cpp file isn't used to register the turbo module in this case as described here: pure-cxx-modules#android
Packages
Selected options
npx create-react-native-library cppLibraryTest
- ? What is the name of the npm package? › cpp-lib-test
- ? What type of library do you want to develop? › Turbo Module
- ? Which languages do you want to use? › C++ for Android & iOS
Link to repro
N/A
Environment
System:
OS: macOS 15.0.1
CPU: (11) arm64 Apple M3 Pro
Memory: 90.06 MB / 18.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 23.7.0
path: /opt/homebrew/bin/node
Yarn:
version: 3.6.1
path: /opt/homebrew/bin/yarn
npm:
version: 11.2.0
path: /opt/homebrew/bin/npm
Watchman:
version: 2025.02.17.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/opt/ruby/bin/pod
Description
I'm not sure if I'm missing something obvious but when creating the library template for a Turbo Module using C++ for Android & iOS there is a default example implementing a
multiplyfunction. However, on Android the implementation for this function is in Kotlin and it doesn't use the shared C++ library.When the JS code calls
multiplyit comes into the code here.Is there any reason why the
OnLoad.cppfile isn't used to register the turbo module in this case as described here: pure-cxx-modules#androidPackages
Selected options
npx create-react-native-library cppLibraryTestLink to repro
N/A
Environment