Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-appsflyer

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-appsflyer - npm Package Compare versions

Comparing version 6.12.2 to 6.13.0-rc1

Docs/RN_CMP.md

47

Docs/RN_API.md

@@ -38,2 +38,4 @@ ---

- [disableAdvertisingIdentifier](#disableAdvertisingIdentifier)
- [enableTCFDataCollection](#enableTCFDataCollection)
- [setConsentData](#setConsentData)
- [Android Only APIs](#android-only-apis)

@@ -754,2 +756,47 @@ - [setCollectAndroidID](#setcollectandroidid)

---
### enableTCFDataCollection
`enableTCFDataCollection(enabled): void`
instruct the SDK to collect the TCF data from the device.
| parameter | type | description |
| ---------- |----------|------------------ |
| enabled | boolean | enable/disable TCF data collection |
*Example:*
```javascript
appsFlyer.enableTCFDataCollection(true);
```
---
### setConsentData
`setConsentData(consentObject): void`
When GDPR applies to the user and your app does not use a CMP compatible with TCF v2.2, use this API to provide the consent data directly to the SDK.<br>
The AppsFlyerConsent object has 2 methods:
1. `AppsFlyerConsent.forNonGDPRUser`: Indicates that GDPR doesn’t apply to the user and generates nonGDPR consent object. This method doesn’t accept any parameters.
2. `AppsFlyerConsent.forGDPRUser`: create an AppsFlyerConsent object with 2 parameters:
| parameter | type | description |
| ---------- |----------|------------------ |
| hasConsentForDataUsage | boolean | Indicates whether the user has consented to use their data for advertising purposes |
| hasConsentForAdsPersonalization | boolean | Indicates whether the user has consented to use their data for personalized advertising |
*Example:*
```javascript
import appsFlyer, {AppsFlyerConsent} from 'react-native-appsflyer';
let nonGDPRUser = AppsFlyerConsent.forNonGDPRUser();
// OR
let GDPRUser = AppsFlyerConsent.forGDPRUser(true, false);
appsFlyer.setConsentData(nonGDPRUser /**or**/ GDPRUser);
```
## Android Only APIs

@@ -756,0 +803,0 @@

2

Docs/RN_UserInvite.md

@@ -39,3 +39,3 @@ ---

// set the tamplate ID before you generate a link. Without it UserInvite won't work.
// set the template ID before you generate a link. Without it UserInvite won't work.
appsFlyer.setAppInviteOneLinkID('scVs', null);

@@ -42,0 +42,0 @@

@@ -117,2 +117,9 @@ /**

export const AppsFlyerConsent: {
forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => void;
forNonGDPRUser: () => void;
}
export type AppsFlyerConsentType = typeof AppsFlyerConsent;
const appsFlyer: {

@@ -155,2 +162,4 @@ onInstallConversionData(callback: (data: ConversionData) => any): () => void;

startSdk(): void
enableTCFDataCollection(enabled: boolean): void
setConsentData(consentData: AppsFlyerConsentType): void

@@ -157,0 +166,0 @@ /**

@@ -628,2 +628,18 @@ import { NativeEventEmitter, NativeModules } from 'react-native';

/**
* instruct the SDK to collect the TCF data from the device.
* @param enabled: if the sdk should collect the TCF data. true/false
*/
appsFlyer.enableTCFDataCollection= (enabled) => {
return RNAppsFlyer.enableTCFDataCollection(enabled);
}
/**
* If your app does not use a CMP compatible with TCF v2.2, use the SDK API detailed below to provide the consent data directly to the SDK.
* @param consentData: AppsFlyerConsent object.
*/
appsFlyer.setConsentData = (consentData) => {
return RNAppsFlyer.setConsentData(consentData);
}
function AFParseJSONException(_message, _data) {

@@ -635,2 +651,24 @@ this.message = _message;

export default appsFlyer;
// Consent object
export const AppsFlyerConsent = (function () {
// Private constructor
function AppsFlyerConsent(isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization) {
this.isUserSubjectToGDPR = isUserSubjectToGDPR;
this.hasConsentForDataUsage = hasConsentForDataUsage;
this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;
}
return {
// Factory method for GDPR user
forGDPRUser: function(hasConsentForDataUsage, hasConsentForAdsPersonalization) {
return new AppsFlyerConsent(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);
},
// Factory method for non GDPR user
forNonGDPRUser: function() {
return new AppsFlyerConsent(false, null, null);
}
};
})();
export default appsFlyer;
{
"name": "react-native-appsflyer",
"version": "6.12.2",
"version": "6.13.0-rc1",
"description": "React Native Appsflyer plugin",

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

@@ -6,3 +6,2 @@ const path = require('path');

platforms: {
ios: { podspecPath: path.join(__dirname, 'react-native-appsflyer.podspec') },
android: {

@@ -14,2 +13,2 @@ packageImportPath: 'import com.appsflyer.reactnative.RNAppsFlyerPackage;',

},
};
};

@@ -54,2 +54,3 @@ <img src="https://massets.appsflyer.com/wp-content/uploads/2018/06/20092440/static-ziv_1TP.png" width="400" >

- [Uninstall measurement](/Docs/RN_UninstallMeasurement.md)
- [Send consent for DMA compliance](/Docs/RN_CMP.md)
## 🔗 Deep Linking

@@ -65,1 +66,2 @@ - [Integration](/Docs/RN_DeepLinkIntegrate.md)

### [API reference](/Docs/RN_API.md)

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc