react-native-appboy-sdk
Advanced tools
Comparing version 1.27.0 to 1.28.0
@@ -21,2 +21,3 @@ const ReactAppboy = require('../index'); | ||
registerAndroidPushToken: jest.fn(), | ||
setGoogleAdvertisingId: jest.fn(), | ||
setFirstName: jest.fn(), | ||
@@ -94,2 +95,9 @@ setLastName: jest.fn(), | ||
test('it calls AppboyReactBridge.setGoogleAdvertisingId', () => { | ||
const googleAdvertisingId = "some_ga_id"; | ||
const adTrackingEnabled = true; | ||
ReactAppboy.setGoogleAdvertisingId(googleAdvertisingId, adTrackingEnabled); | ||
expect(NativeModules.AppboyReactBridge.setGoogleAdvertisingId).toBeCalledWith(googleAdvertisingId, adTrackingEnabled); | ||
}); | ||
test('it calls AppboyReactBridge.setFirstName', () => { | ||
@@ -96,0 +104,0 @@ const first_name = "some_name"; |
@@ -0,1 +1,13 @@ | ||
## 1.28.0 | ||
##### ⚠ Breaking | ||
- Updated the native iOS bridge to [Braze iOS SDK 4.0.2](https://github.com/Appboy/appboy-ios-sdk/blob/master/CHANGELOG.md#402). | ||
- Updated the native Android bridge to [Braze Android SDK 13.1.2](https://github.com/Appboy/appboy-android-sdk/blob/master/CHANGELOG.md#1312), which contains support for Android 12. | ||
##### Added | ||
- Added support for `ReactAppboy.setGoogleAdvertisingId()` to set the Google Advertising ID and associated ad-tracking enabled field for Android devices. This is a no-op on iOS. | ||
##### Fixed | ||
- Fixed an issue where calling `getInstallTrackingId()` while the SDK was disabled would cause a crash on iOS. | ||
## 1.27.0 | ||
@@ -2,0 +14,0 @@ |
@@ -153,2 +153,13 @@ // Definitions by: ahanriat <https://github.com/ahanriat> | ||
/** | ||
* This method sets the Google Advertising ID and associated ad-tracking enabled field for this device. Note that the | ||
* SDK does not automatically collect this data. | ||
* | ||
* No-op on iOS. | ||
* | ||
* @param {string} googleAdvertisingId - The Google Advertising ID | ||
* @param {boolean} adTrackingEnabled - Whether ad-tracking is enabled for the Google Advertising ID | ||
*/ | ||
export function setGoogleAdvertisingId(googleAdvertisingId: string, adTrackingEnabled: boolean): void; | ||
/** | ||
* Sets whether the user should be sent push campaigns. | ||
@@ -155,0 +166,0 @@ * @param {NotificationSubscriptionType} notificationSubscriptionType - Notification setting (explicitly |
13
index.js
@@ -145,2 +145,15 @@ const AppboyReactBridge = require('react-native').NativeModules.AppboyReactBridge; | ||
/** | ||
* This method sets the Google Advertising ID and associated ad-tracking enabled field for this device. Note that the | ||
* SDK does not automatically collect this data. | ||
* | ||
* No-op on iOS. | ||
* | ||
* @param {string} googleAdvertisingId - The Google Advertising ID | ||
* @param {boolean} adTrackingEnabled - Whether ad-tracking is enabled for the Google Advertising ID | ||
*/ | ||
setGoogleAdvertisingId: function(googleAdvertisingId, adTrackingEnabled) { | ||
AppboyReactBridge.setGoogleAdvertisingId(googleAdvertisingId, adTrackingEnabled); | ||
}, | ||
/** | ||
* Reports that the current user performed a custom named event. | ||
@@ -147,0 +160,0 @@ * @param {string} eventName - The identifier for the event to track. Best practice is to track generic events |
{ | ||
"name": "react-native-appboy-sdk", | ||
"version": "1.27.0", | ||
"version": "1.28.0", | ||
"description": "Braze SDK for React Native.", | ||
@@ -30,3 +30,3 @@ "main": "index.js", | ||
"author": "Appboy", | ||
"license": "LICENSE.md", | ||
"license": "SEE LICENSE IN LICENSE.md", | ||
"bugs": { | ||
@@ -33,0 +33,0 @@ "url": "https://github.com/Appboy/appboy-react-sdk/issues" |
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
213221
3010