0.34.0 (2026-02-26)
❗️ JNI OnLoad (cpp-adapter.cpp) change
For library authors: In your JNI OnLoad function (often in cpp-adapter.cpp), you should migrate to the new initialization API:
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
- return margelo::nitro::$$androidNamespace$$::initialize(vm);
+ return facebook::jni::initialize(vm, []() {
+ margelo::nitro::$$androidNamespace$$::registerAllNatives();
+ });
}Nothing really changes if you don't register any custom native JNI classes/functions, and it will also not break if you don't migrate. But it is recommended either way, as this new API allows you to create custom C++ native JNI classes/functions and register them.
✨ Features
- Add
createNativeArrayBuffer(size)to NitroModulesProxy (#1226) (c2b4ba4) - Add lambda argument for custom JNI registrations in
initialize…(...)(#1222) (8dde8b8)
🐛 Bug Fixes
- Fall back to
ByteBuffercopy ifHardwareBuffercopy fails (513a50b) - Fix
has*/is*property names being simplified on Swift/Kotlin (#1223) (47e867d) - Fix AnyMap
canConvertto check values instead of keys (#1163) (23cccba) - Rename
initialize()toregisterAllNatives()to be more aligned with fbjni (#1225) (3d4070b) - Test both C++ and Swift/Kotlin Test Objects with Harness (#1224) (c3d7839)
- Throw if
HardwareBuffer-backedArrayBufferis non-CPU-readable (#1227) (63aa30c) - Use
AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTENinstead ofAHARDWAREBUFFER_USAGE_CPU_WRITE_MASK(044b7fd)