Skip to content

Commit 233c9e7

Browse files
authored
fix: [SDK-4390] bump react-native peer dep to >=0.79.0 for TurboModule support (#1944)
1 parent d6f7258 commit 233c9e7

5 files changed

Lines changed: 736 additions & 4286 deletions

File tree

MIGRATION_GUIDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# React Native v5.0.0 Migration Guide
22

3+
#### ⚠️ React Native version requirement for v5.4.x
4+
5+
`react-native-onesignal` `5.4.x` registers its iOS TurboModule through the `codegenConfig.ios.modulesProvider` field, which was introduced in React Native `0.79`. Apps on React Native `0.76``0.78` (including Expo SDK `52`) will hit `Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'OneSignal' could not be found` at runtime when the New Architecture is enabled. Stay on `5.3.x` until you can move to React Native `0.79+` (Expo SDK `53+`); `5.3.x` uses the legacy bridge module and works on the New Architecture via the interop layer.
6+
37
#### ⚠️ Migration Advisory for current OneSignal customers
48

59
Our new [user-centric APIs and v5.x.x SDKs](https://onesignal.com/blog/unify-your-users-across-channels-and-devices/) offer an improved user and data management experience. However, they may not be at 1:1 feature parity with our previous versions yet.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ If you run into any challenges or have concerns, please contact our support team
2323

2424
[OneSignal](https://onesignal.com/) is a free email, sms, push notification, and in-app message service for mobile apps. This SDK makes it easy to integrate your native React-Native iOS and/or Android apps with OneSignal.
2525

26+
#### Requirements
27+
28+
- React Native `>=0.79.0` for `5.4.x` and later. The TurboModule registers itself through the `codegenConfig.ios.modulesProvider` field added in React Native 0.79, so earlier versions will throw `TurboModuleRegistry.getEnforcing(...): 'OneSignal' could not be found` at runtime when the New Architecture is enabled. Apps on React Native `0.76``0.78` (including Expo SDK 52) should stay on `5.3.x`, which uses the legacy bridge module and works on the New Architecture via the interop layer.
29+
2630
#### Installation
2731

2832
See the [Setup Guide](https://documentation.onesignal.com/docs/react-native-sdk-setup) for setup instructions.

0 commit comments

Comments
 (0)