Skip to content

Releases: mrousavy/nitro

Release 0.35.0

04 Mar 13:10

Choose a tag to compare

0.35.0 (2026-03-04)

❗️ Breaking Change

#1238 is the first breaking change after >1 year in Nitro. Unfortunately it is necessary, as it fixes a critical memory leak in Kotlin HybridObjects.

  • For app developers: Try upgrading to Nitro 0.35.x and attempt a build. If it fails due to anything looking like super.updateNative(...), JHybridObject, HybridBase, or AnyMapHolder, the Nitro library you are using needs to update to Nitro 0.35.x as well and re-generate their specs. Swift and C++ libraries will work fine, only Kotlin HybridObjects have a breaking change.
  • For library authors: Upgrade to Nitro 0.35.x (and nitrogen 0.35.x), and re-generate your specs. Follow these steps to migrate your library:
    1. Re-generating specs will automatically make your library compatible and implements the JHybridObject change.
    2. If you use bigint in your specs, replace it with either Int64 or UInt64:
       interface Math extends HybridObject<...> {
      -  calculateFibonacci(n: bigint): bigint
      +  calculateFibonacci(n: UInt64): UInt64
       }
      See #1212 for more information.
    3. Replace your JNI initialization (cpp-adapter.cpp or JNIOnLoad.cpp) with this:
       JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
      -  return margelo::nitro::$$androidNamespace$$::initialize(vm);
      +  return facebook::jni::initialize(vm, []() {
      +    margelo::nitro::$$androidNamespace$$::registerAllNatives();
      +  });
       }
    As an example, take a look at react-native-nitro-image: PR #103 for a guideline on how to upgrade.

🐛 Bug Fixes

  • Remove a bunch of deprecated APIs (#1245) (0cd8eea)
  • Don't strip HybridSomeExternalObject (f9da753)
  • Fix Kotlin HybridObject jni::global_ref memory leak by separating CxxPart with weak_ptr (#1238) (32a4c86), closes #1239

Release 0.35.0-beta.0

03 Mar 16:58

Choose a tag to compare

Release 0.35.0-beta.0 Pre-release
Pre-release

0.35.0-beta.0 (2026-03-03)

❗️ Breaking Change

I think the change in JHybridObject is breaking. I will test (and potentially improve) this before making 0.35.0 stable.
Library authors need to re-generate their specs to support 0.35.0 onwards.

🐛 Bug Fixes

  • Don't strip HybridSomeExternalObject (f9da753)
  • Fix Kotlin HybridObject jni::global_ref memory leak by separating CxxPart with weak_ptr (#1238) (32a4c86), closes #1239

📚 Documentation

  • Add new module react-native-nitro-version-check to the Nitro Modules documentation (#1230) (1a70829)

Release 0.34.1

27 Feb 12:54

Choose a tag to compare

0.34.1 (2026-02-27)

🐛 Bug Fixes

  • Fix HardwareBuffer isCPUReadable check (42f6394)

Release 0.34.0

26 Feb 20:22

Choose a tag to compare

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 ByteBuffer copy if HardwareBuffer copy fails (513a50b)
  • Fix has*/is* property names being simplified on Swift/Kotlin (#1223) (47e867d)
  • Fix AnyMap canConvert to check values instead of keys (#1163) (23cccba)
  • Rename initialize() to registerAllNatives() to be more aligned with fbjni (#1225) (3d4070b)
  • Test both C++ and Swift/Kotlin Test Objects with Harness (#1224) (c3d7839)
  • Throw if HardwareBuffer-backed ArrayBuffer is non-CPU-readable (#1227) (63aa30c)
  • Use AHARDWAREBUFFER_USAGE_CPU_WRITE_OFTEN instead of AHARDWAREBUFFER_USAGE_CPU_WRITE_MASK (044b7fd)

Release 0.33.9

12 Feb 11:01

Choose a tag to compare

0.33.9 (2026-02-12)

🐛 Bug Fixes

  • Fix optional<double> failing to build in release in Swift (#1215) (e29f58c)

📚 Documentation

  • add react-native-google-maps-plus to awesome nitro modules list (#1211) (abb96d4)

Release 0.33.8

10 Feb 18:46

Choose a tag to compare

0.33.8 (2026-02-10)

✨ Features

  • Expose Int64 and UInt64 - deprecate bigint (#1212) (a42b35e)

🐛 Bug Fixes

  • Fix accidentally converting bigints to double (6728fbf)

📚 Documentation

Release 0.33.7

04 Feb 19:32

Choose a tag to compare

0.33.7 (2026-02-04)

🐛 Bug Fixes

Release 0.33.6

04 Feb 19:23

Choose a tag to compare

Release 0.33.6 Pre-release
Pre-release

0.33.6 (2026-02-04)

🐛 Bug Fixes

  • Fix AnyMap not overwriting keys (#1204) (7c5666c)
  • Fix PropNameIDCache not overwriting stale values in cache (#1203) (52ae0c2)

Release 0.33.5

03 Feb 16:01

Choose a tag to compare

0.33.5 (2026-02-03)

🐛 Bug Fixes

  • Run ThreadUtils::setThreadName(...) under jni::ThreadScope (#1200) (ecc8c2d)

Release 0.33.4

03 Feb 12:21

Choose a tag to compare

0.33.4 (2026-02-03)

💨 Performance Improvements

  • Set isDirty to false to avoid JNI roundtrips (#1195) (67d45a4)

🐛 Bug Fixes

  • Fix NitroModulesSpec.h import for use_frameworks (#1196) (281afe8)