@braze/react-native-sdk
Advanced tools
Comparing version 4.1.0 to 5.0.0
@@ -181,3 +181,2 @@ const NativeModules = require('react-native').NativeModules; | ||
Braze.changeUser(user_id); | ||
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled(); | ||
expect(NativeModules.BrazeReactBridge.changeUser).toBeCalledWith(user_id, null); | ||
@@ -197,4 +196,2 @@ }); | ||
expect(NativeModules.BrazeReactBridge.addAlias).toBeCalledWith(aliasName, aliasLabel); | ||
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled(); | ||
expect(NativeModules.BrazeReactBridge.setMetadata).toBeCalled(); | ||
}); | ||
@@ -206,3 +203,2 @@ | ||
Braze.logCustomEvent(event_name, event_properties); | ||
expect(NativeModules.BrazeReactBridge.setSDKFlavor).toBeCalled(); | ||
expect(NativeModules.BrazeReactBridge.logCustomEvent).toBeCalledWith(event_name, event_properties); | ||
@@ -209,0 +205,0 @@ }); |
@@ -21,3 +21,2 @@ // jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter.js', () => { | ||
addAlias: jest.fn(), | ||
setSDKFlavor: jest.fn(), | ||
logCustomEvent: jest.fn(), | ||
@@ -72,3 +71,2 @@ logPurchase: jest.fn(), | ||
setLastKnownLocation: jest.fn(), | ||
setMetadata: jest.fn(), | ||
requestPushPermission: jest.fn(), | ||
@@ -75,0 +73,0 @@ getFeatureFlag: jest.fn(), |
{ | ||
"name": "@braze/react-native-sdk", | ||
"version": "4.1.0", | ||
"version": "5.0.0", | ||
"description": "Braze SDK for React Native.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -20,3 +20,3 @@ <p align="center"> | ||
> Support for React Native 0.69+ (New Architecture) is on the feature roadmap. | ||
> From version 2.0.1 and up, the Braze React Native SDK is compatible with the React Native New Architecture introduced in React Native v0.68+. While our React Native SDK is currently compatible with the New Architecture as a Native Module, we are actively working on converting our Braze library to a backwards compatible Turbo Module and will continue to make improvements for the New Architecture. | ||
@@ -23,0 +23,0 @@ ## Braze Expo Plugin |
@@ -113,4 +113,2 @@ import { | ||
static changeUser(userId, signature) { | ||
this.bridge.setSDKFlavor(); | ||
this.bridge.setMetadata(); | ||
this.bridge.changeUser( | ||
@@ -147,4 +145,2 @@ userId, | ||
static addAlias(aliasName, aliasLabel) { | ||
this.bridge.setSDKFlavor(); | ||
this.bridge.setMetadata(); | ||
this.bridge.addAlias(aliasName, aliasLabel); | ||
@@ -191,4 +187,2 @@ } | ||
static logCustomEvent(eventName, eventProperties) { | ||
this.bridge.setSDKFlavor(); | ||
this.bridge.setMetadata(); | ||
parseNestedProperties(eventProperties); | ||
@@ -195,0 +189,0 @@ this.bridge.logCustomEvent(eventName, eventProperties); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
198411
2405