Skip to content

fix: Rename initialize() to registerAllNatives() to be more aligned with fbjni#1225

Merged
mrousavy merged 4 commits intomainfrom
fix/fix-fbjni-init
Feb 26, 2026
Merged

fix: Rename initialize() to registerAllNatives() to be more aligned with fbjni#1225
mrousavy merged 4 commits intomainfrom
fix/fix-fbjni-init

Conversation

@mrousavy
Copy link
Owner

@mrousavy mrousavy commented Feb 26, 2026

Requires change for Nitro Modules:

 JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
-  return margelo::nitro::$$androidNamespace$$::initialize(vm);
+  return facebook::jni::initialize(vm, []() {
+    margelo::nitro::$$androidNamespace$$::registerAllNatives();
+  });
 }

It is backwards compatible though.

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitro-docs Ready Ready Preview, Comment Feb 26, 2026 7:36pm

Request Review

@mrousavy mrousavy merged commit 3d4070b into main Feb 26, 2026
13 of 14 checks passed
@mrousavy mrousavy changed the title fix: Rename initialize() to registerNatives() to be more aligned with fbjni fix: Rename initialize() to registerAllNatives() to be more aligned with fbjni Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant