New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@braze/react-native-sdk

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@braze/react-native-sdk - npm Package Compare versions

Comparing version

to
13.2.0

12

__tests__/index.test.js

@@ -82,2 +82,14 @@ const NativeEventEmitter = require('react-native').NativeEventEmitter;

test('it calls BrazeReactBridge.setIdentifierForVendor', () => {
const idfv = "some_idfv";
Braze.setIdentifierForVendor(idfv);
expect(NativeBrazeReactModule.setIdentifierForVendor).toBeCalledWith(idfv);
});
test('it calls BrazeReactBridge.setIdentifierForAdvertiser', () => {
const idfa = "some_idfa";
Braze.setIdentifierForAdvertiser(idfa);
expect(NativeBrazeReactModule.setIdentifierForAdvertiser).toBeCalledWith(idfa);
});
test('it calls BrazeReactBridge.setFirstName', () => {

@@ -84,0 +96,0 @@ const first_name = "some_name";

2

__tests__/jest.setup.js

@@ -98,2 +98,4 @@ jest.mock('react-native/Libraries/EventEmitter/NativeEventEmitter');

setAdTrackingEnabled: jest.fn(),
setIdentifierForAdvertiser: jest.fn(),
setIdentifierForVendor: jest.fn(),
updateTrackingPropertyAllowList: jest.fn()

@@ -100,0 +102,0 @@ };

2

package.json
{
"name": "@braze/react-native-sdk",
"version": "13.1.1",
"version": "13.2.0",
"description": "Braze SDK for React Native.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -6,11 +6,15 @@ <p align="center">

# Braze React SDK
# Braze React Native SDK
Effective marketing automation is an essential part of successfully scaling and managing your business. Braze empowers you to build better customer relationships through a seamless, multi-channel approach that addresses all aspects of the user life cycle Braze helps you engage your users on an ongoing basis.
- [Braze React Native `npm` package](https://www.npmjs.com/package/@braze/react-native-sdk)
- [Braze User Guide](https://www.braze.com/docs/user_guide/introduction)
- [Initial React Native SDK Setup](https://www.braze.com/docs/developer_guide/platform_integration_guides/react_native/react_sdk_setup/)
- [Initial React Native SDK Setup](https://www.braze.com/docs/developer_guide/platforms/react_native/sdk_integration)
## Version Support
> [!NOTE]
> This SDK has been tested with React Native version **0.77.0**.
| Braze Plugin | React Native | Supports New Architecture? |

@@ -23,2 +27,6 @@ | ------------ | ------------ | -------------------------- |

This SDK additionally inherits the requirements of its underlying Braze native SDKs. Be sure to also adhere to the lists below:
* [Android SDK requirements](https://github.com/braze-inc/braze-android-sdk?tab=readme-ov-file#version-information)
* [Swift SDK requirements](https://github.com/braze-inc/braze-swift-sdk?tab=readme-ov-file#version-information)
## Braze Expo Plugin

@@ -67,3 +75,3 @@

## Testing
- We use [jest](https://facebook.github.io/jest/) for testing the React SDK.
- We use [jest](https://facebook.github.io/jest/) for testing the React Native SDK.
- Run the tests and code coverage report using `npm test`

@@ -1000,2 +1000,22 @@ import {

/**
* This method passes the Identifier For Advertiser (IDFA) to Braze for iOS. It is a no-op on Android.
*
* See Apple's docs on [App Tracking Transparency](https://apple.co/3LM7mm2) for more information.
*
* @param {string} identifierForAdvertiser - The IDFA.
*/
static setIdentifierForAdvertiser(identifierForAdvertiser) {
return this.bridge.setIdentifierForAdvertiser(identifierForAdvertiser);
}
/**
* This method passes the Identifier For Vendor (IDFV) to Braze for iOS. It is a no-op on Android.
*
* @param {string} identifierForVendor - The IDFV.
*/
static setIdentifierForVendor(identifierForVendor) {
return this.bridge.setIdentifierForVendor(identifierForVendor);
}
/**
* Updates the list of data types you wish to declare or remove as tracked user data.

@@ -1002,0 +1022,0 @@ *

@@ -209,2 +209,18 @@ // Definitions by: ahanriat <https://github.com/ahanriat>

/**
* This method passes the Identifier For Advertiser (IDFA) to Braze for iOS. It is a no-op on Android.
*
* See Apple's docs on [App Tracking Transparency](https://apple.co/3LM7mm2) for more information.
*
* @param {string} identifierForAdvertiser - The IDFA.
*/
export function setIdentifierForAdvertiser(identifierForAdvertiser: string): void;
/**
* This method passes the Identifier For Vendor (IDFV) to Braze for iOS. It is a no-op on Android.
*
* @param {string} identifierForVendor - The IDFV.
*/
export function setIdentifierForVendor(identifierForVendor: string): void;
/**
* Updates the list of data types you wish to declare or remove as tracked user data.

@@ -211,0 +227,0 @@ *

@@ -201,2 +201,4 @@ import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport';

setAdTrackingEnabled(adTrackingEnabled: boolean, googleAdvertisingId: string): void;
setIdentifierForAdvertiser(identifierForAdvertiser: string): void;
setIdentifierForVendor(identifierForVendor: string): void;
updateTrackingPropertyAllowList(allowList: Object): void;

@@ -203,0 +205,0 @@

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

Sorry, the diff of this file is not supported yet