Skip to content

Commit 02ae634

Browse files
authored
fix: Upgrade to Nitro 0.35.0 (#103)
* chore: Upgrade to Nitro 0.35.0 * fix: Generate specs to implement JHybridObject memory leak fix Regenerate the specs to implement the breaking change in Nitro related to the Kotlin HybridObject memory leak: mrousavy/nitro#1238 * chore: Implement `cpp-adapter` change to new `initialize` API (optional) This is fully optional, but recommended for more flexibility for custom JNI registrations if needed. * Update cpp-adapter.cpp
1 parent 1f3ae6a commit 02ae634

37 files changed

Lines changed: 629 additions & 657 deletions

bun.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ PODS:
5050
- ReactCommon/turbomodule/core
5151
- SocketRocket
5252
- Yoga
53-
- NitroModules (0.33.9):
53+
- NitroModules (0.35.0):
5454
- boost
5555
- DoubleConversion
5656
- fast_float
@@ -2741,7 +2741,7 @@ SPEC CHECKSUMS:
27412741
hermes-engine: e7491a2038f2618c8cd444ed411a6deb350a3742
27422742
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
27432743
NitroImage: cf2c56177ed0ac65bd168a1767852ef633e8e8d5
2744-
NitroModules: 7268cbdc66d6ead3200894003724f9dce9405b7d
2744+
NitroModules: 0ffbade1b2ebcfa12f3821c970b17fa369320810
27452745
NitroWebImage: cda985bc1cc9bb6904300c51166bbb635f7bdd16
27462746
RCT-Folly: 59ec0ac1f2f39672a0c6e6cecdd39383b764646f
27472747
RCTDeprecation: 0735ab4f6b3ec93a7f98187b5da74d7916e2cf4c

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react-native-fast-image": "^8.6.3",
1919
"react-native-nitro-image": "workspace:*",
2020
"react-native-nitro-web-image": "workspace:*",
21-
"react-native-nitro-modules": "0.33.9",
21+
"react-native-nitro-modules": "0.35.0",
2222
"react-native-safe-area-context": "^5.6.0",
2323
"react-native-screens": "^4.14.1"
2424
},
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#include <jni.h>
2+
#include <fbjni/fbjni.h>
23
#include "NitroImageOnLoad.hpp"
34

45
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
5-
return margelo::nitro::image::initialize(vm);
6+
return facebook::jni::initialize(vm, []() {
7+
margelo::nitro::image::registerAllNatives();
8+
});
69
}

packages/react-native-nitro-image/nitrogen/generated/android/NitroImageOnLoad.cpp

Lines changed: 72 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-native-nitro-image/nitrogen/generated/android/NitroImageOnLoad.hpp

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)