Not compatible with react-native 0.76
After upgrading to react-native 0.76, on Android I see the following runtime error:
(NOBRIDGE) ERROR Error: Exception in HostObject::get for prop 'RNIterableAPI': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNIterableAPI. Details: Module exports two methods to JavaScript with the same name: "setEmail (NOBRIDGE) WARN Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'Iterable' of undefined
Is there a roadmap for when the SDK will become compatible with the new RN version?
We were able to resolve this in the meantime by utilizing yarn patch to remove the single argument methods:
diff --git a/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java b/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
index 0f55031aac67cdabbef42a496981d87ee4c7dbf9..6ac8fdbaebf842407a8758c3146fcad8d07b9a8b 100644
--- a/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
+++ b/android/src/main/java/com/iterable/reactnative/RNIterableAPIModule.java
@@ -106,13 +106,6 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
promise.resolve(true);
}
- @ReactMethod
- public void setEmail(@Nullable String email) {
- IterableLogger.d(TAG, "setEmail: " + email);
-
- IterableApi.getInstance().setEmail(email);
- }
-
@ReactMethod
public void setEmail(@Nullable String email, @Nullable String authToken) {
IterableLogger.d(TAG, "setEmail: " + email + " authToken: " + authToken);
@@ -120,13 +113,6 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
IterableApi.getInstance().setEmail(email, authToken);
}
- @ReactMethod
- public void updateEmail(String email) {
- IterableLogger.d(TAG, "updateEmail: " + email);
-
- IterableApi.getInstance().updateEmail(email);
- }
-
@ReactMethod
public void updateEmail(String email, @Nullable String authToken) {
IterableLogger.d(TAG, "updateEmail: " + email + " authToken: " + authToken);
@@ -145,12 +131,6 @@ public class RNIterableAPIModule extends ReactContextBaseJavaModule implements I
callback.invoke("Received numberArgument: " + numberArgument + " stringArgument: " + stringArgument);
}
- @ReactMethod
- public void setUserId(@Nullable String userId) {
- IterableLogger.d(TAG, "setUserId: " + userId);
- IterableApi.getInstance().setUserId(userId);
- }
-
@ReactMethod
public void setUserId(@Nullable String userId, @Nullable String authToken) {
IterableLogger.d(TAG, "setUserId: " + userId + " authToken: " + authToken);
Anyone from Iterable able to comment on this? @evantk91 perhaps? RN is now on 0.78 so this feels overdue
I ended up doing the same as @jnleonard3 ! thanks for the advice!..
Iterable! come on you should fix this!
Hi all. We've released a beta on master which incorporates an update to RN 0.75.3. Upgrading to this version should fix the issue.
NOTE: As this is a beta release, there is a higher likelihood that you may encounter issues. We suggest updating in a sandbox environment first.
If your team is interested in partnering on current or upcoming Iterable RN SDK priorities (including this beta), please contact your CSM!
I tried the v2 beta but still got the same error (with 0.76 and New Architecture enabled).
Error: Exception in HostObject::get for prop 'RNIterableAPI': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNIterableAPI. Details: Module exports two methods to JavaScript with the same name: "setEmail
@dwxw, we do not yet support the New Architecture, unfortunately. That's a separate initiative.
@lposen Is there an ETA on New Architecture? Iterable is the last remaining library we’re waiting on here, and this could become a total blocker for us continuing to use Iterable
@genericwoods We're aiming to support new arch by Q4 of this year.
Hi everyone,
As of @iterable/[email protected], the SDK now supports React Native’s new architecture via interop mode.
This allows projects using the new architecture to integrate the SDK without immediate migration blockers — but please note:
⚠️ Use With Caution
This support is provided through interop, not yet via native TurboModules. As such:
- Per React Native guidance, you may encounter bugs, edge-case behavior, or degraded performance
- We do not recommend relying on this setup in performance-sensitive environments
- We strongly encourage thorough testing before releasing any new architecture app using
@iterable/react-native-sdkto production
We’re actively working on a full TurboModule implementation. Until then, interop support is available at your own risk.
We’d appreciate any feedback — including any issues you encounter — as it will help guide our migration and stability work.
Thanks for your patience and continued support!
Hi everyone,
As of
@iterable/[email protected], the SDK now supports React Native’s new architecture via interop mode.This allows projects using the new architecture to integrate the SDK without immediate migration blockers — but please note:
⚠️ Use With Caution
This support is provided through interop, not yet via native TurboModules. As such:
- Per React Native guidance, you may encounter bugs, edge-case behavior, or degraded performance
- We do not recommend relying on this setup in performance-sensitive environments
- We strongly encourage thorough testing before releasing any new architecture app using
@iterable/react-native-sdkto productionWe’re actively working on a full TurboModule implementation. Until then, interop support is available at your own risk.
We’d appreciate any feedback — including any issues you encounter — as it will help guide our migration and stability work.
Thanks for your patience and continued support!
Hey, I'm running into an issue after updating react-native-iterable to version 2.0.1.
My setup:
React Native 0.79.5
New Architecture enabled
The project started failing to build after the update. Could you please help with this or point me in the right direction? Thanks in advance!
Hi @Azelesnkiy,
This issue should now be resolved in @iterable/[email protected]. Please update to the latest version and try building again.
The root cause was that one of the Objective-C source files needed to be converted to Objective-C++ (.mm). Version 2.0.2 addresses this and should resolve the issue without requiring changes to your project’s build settings.
Thanks again for reporting this!
🧪 Beta Release: 2.1.0-beta.0 with React Native New Architecture Support
We’re excited to announce the beta release of 2.1.0-beta.0, which includes support for React Native’s New Architecture (Fabric + TurboModules)! 🎉
This is an early preview for developers who want to try out the new architecture and provide feedback before the stable release.
🚀 How to Install
Install the beta version:
npm install @iterable/react-native-sdk@beta
Or with Yarn:
yarn add @iterable/react-native-sdk@beta
⚙️ How to Enable React Native’s New Architecture
ℹ️ Make sure you're using a React Native version that supports the new architecture (e.g. 0.71+).
To use this beta release, you must enable the New Architecture in your app.
✅ iOS
- Open your project’s
ios/Podfile - Add or uncomment the following:
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
- Reinstall pods:
cd ios
bundle exec pod install --repo-update
cd ..
If you encounter issues with the build, try doing a more thorough clean and re-installing pods:
cd ios
bundle exec pod deintegrate
rm -rf ~/Library/Developer/Xcode/DerivedData Pods Podfile.lock build ../Gemfile.lock
bundle install
bundle exec pod install
cd ..
- Rebuild the app:
npx react-native run-ios
✅ Android
- Open
android/gradle.properties - Add or ensure this line is present:
newArchEnabled=true
- Clean the app:
cd android
./gradlew clean
cd ..
If you encounter issues with the build, try doing a more thorough clean:
cd android
rm -rf .gradle build app/build app/.cxx
./gradlew clean
cd ..
- Rebuild the app:
npx react-native run-android
⚠️ Beta Caveats
Please keep in mind:
- This is a beta release — you may encounter bugs or integration issues
- We recommend using this beta in a test branch or sandboxed environment
🙏 How You Can Help
We’d love your feedback! If you:
- Hit issues, open a bug report or support ticket
- Get things working smoothly, let us know! 🎉
- Have compatibility notes to share, we'd love to include them in future docs
Thanks for helping us test the beta and move toward full support for the New Architecture!
Hi all! New architecture is out of beta and fully supported as of version 2.1.0. Let me know if you have any questions or concerns, or if you run into any issues.