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

cordova-plugin-appsflyer-sdk

Package Overview
Dependencies
Maintainers
2
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-appsflyer-sdk - npm Package Compare versions

Comparing version 4.3.0 to 4.3.3

examples/demoC/.idea/demoC.iml

2

package.json
{
"name": "cordova-plugin-appsflyer-sdk",
"version": "4.3.0",
"version": "4.3.3",
"description": "Cordova AppsFlyer SDK Plugin",

@@ -5,0 +5,0 @@ "cordova": {

@@ -0,1 +1,2 @@

<img src="https://www.appsflyer.com/wp-content/uploads/2016/11/logo-1.svg" width="200">

@@ -34,2 +35,3 @@

- [updateServerUninstallToken](#updateServerUninstallToken)
- [stopTracking](#stopTracking)
- [getAppsFlyerUID](#getAppsFlyerUID)

@@ -55,4 +57,4 @@ - [setAppInviteOneLinkID](#setAppInviteOneLinkID)

- iOS AppsFlyerSDK **v4.8.1**
- Android AppsFlyerSDK **v4.8.3**
- iOS AppsFlyerSDK **v4.8.8**
- Android AppsFlyerSDK **v4.8.15**

@@ -321,3 +323,65 @@

---
##### <a id="stopTracking"> **`stopTracking(isStopTracking): void`**
Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. This ID is available in AppsFlyer CSV reports along with postbacks APIs for cross-referencing with you internal IDs.
**Note:** The ID must be set during the first launch of the app at the SDK initialization. The best practice is to call this API during the `deviceready` event, where possible.
| parameter | type | description |
| ----------- |-----------------------------|--------------|
| `isStopTracking` | `boolean` |In some extreme cases you might want to shut down all SDK tracking due to legal and privacy compliance. This can be achieved with the isStopTracking API. Once this API is invoked, our SDK will no longer communicate with our servers and stop functioning. |
*Example:*
```javascript
window.plugins.appsFlyer.stopTracking(true);
```
In any event, the SDK can be reactivated by calling the same API, but to pass false.
---
##### <a id="registerOnAppOpenAttribution"> **`registerOnAppOpenAttribution(onSuccess, onError): void`**
| parameter | type | description |
| ----------- |-----------------------------|--------------|
| `onSuccess` | `(message: stringifed JSON)=>void` | Success callback - called after receiving data on App Open Attribution.|
| `onError` | `(message: stringifed JSON)=>void` | Error callback - called when error occurs.|
*Example:*
```javascript
window.plugins.appsFlyer.registerOnAppOpenAttribution(function
onAppOpenAttributionSuccess(res){
/*
{
"data": {
"af_deeplink": "true",
"campaign": "boo",
"key": "val",
"media_source": "someMedia",
"install_time": "2018-07-12 13:20:19",
"af_status": "Non-organic",
"path": "",
"scheme": "https",
"host": "ionic.fess.onelink.me"
},
"type": "onAppOpenAttribution",
"status": "success"
}
*/
},
function onAppOpenAttributionError(err){
//...
});
```
---
##### <a id="updateServerUninstallToken"> **`updateServerUninstallToken("token"): void`**

@@ -324,0 +388,0 @@

@@ -0,1 +1,14 @@

#Release Notes
### 4.3.3 (Sept 3, 2018)
Updated the Cordova@6.x (android@7.x) compatible plugin:
* onConversionData/onAppOpenAttribution cannot return at once bug fix
* stopTracking() API for Android and iOS
* Android SDK v4.8.15
* iOS SDK v.4.8.8
### 4.3.1 (Jul 24 2018)
iOS SDK v4.8.1
Android SDK v4.8.3
# Release Notes

@@ -6,3 +19,3 @@ ### 4.2.10 (Nov 30, 2016)

# Release Notes
### 4.2.9 (Nov 25, 2016)

@@ -9,0 +22,0 @@ * moved from PhoneGap to cordova-plugin-appsflyer-sdk

@@ -1,131 +0,154 @@

var exec = require('cordova/exec'),
argscheck = require('cordova/argscheck'),
AppsFlyerError = require('./AppsFlyerError');
var callbackMap = {};
var exec = require('cordova/exec'),
argscheck = require('cordova/argscheck'),
AppsFlyerError = require('./AppsFlyerError');
if (!window.CustomEvent) {
window.CustomEvent = function (type, config) {
var e = document.createEvent("CustomEvent");
e.initCustomEvent(type, true, true, config.detail);
return e;
};
var callbackMap = {};
if (!window.CustomEvent) {
window.CustomEvent = function (type, config) {
var e = document.createEvent("CustomEvent");
e.initCustomEvent(type, true, true, config.detail);
return e;
};
}
(function (global) {
var AppsFlyer = function () {};
AppsFlyer.prototype.initSdk = function (args, successCB, errorCB) {
argscheck.checkArgs('O', 'AppsFlyer.initSdk', arguments);
if (!args) {
if (errorCB) {
errorCB(AppsFlyerError.INVALID_ARGUMENT_ERROR);
}
} else {
if(args.appId !== undefined && typeof args.appId != 'string'){
if (errorCB) {
errorCB(AppsFlyerError.APPID_NOT_VALID);
}
}
exec(successCB, errorCB, "AppsFlyerPlugin", "initSdk", [args]);
document.addEventListener("resume", this.onResume.bind(this), false);
callbackMap.convSuc = successCB;
callbackMap.convErr = errorCB;
}
(function (global) {
var AppsFlyer = function () {};
};
AppsFlyer.prototype.initSdk = function (args, successCB, errorCB) {
argscheck.checkArgs('O', 'AppsFlyer.initSdk', arguments);
if (!args) {
if (errorCB) {
errorCB(AppsFlyerError.INVALID_ARGUMENT_ERROR);
}
} else {
if(args.appId !== undefined && typeof args.appId != 'string'){
if (errorCB) {
errorCB(AppsFlyerError.APPID_NOT_VALID);
}
}
exec(successCB, errorCB, "AppsFlyerPlugin", "initSdk", [args]);
AppsFlyer.prototype.registerOnAppOpenAttribution = function (onAppOpenAttributionSuccess, onAppOpenAttributionError) {
argscheck.checkArgs('FF', 'AppsFlyer.registerOnAppOpenAttribution', arguments);
document.addEventListener("resume", this.onResume.bind(this), false);
callbackMap.attrSuc = onAppOpenAttributionSuccess;
callbackMap.attrErr = onAppOpenAttributionError;
callbackMap = {
suc: successCB,
err: errorCB
};
exec(onAppOpenAttributionSuccess, onAppOpenAttributionError, "AppsFlyerPlugin", "registerOnAppOpenAttribution", []);
};
}
};
AppsFlyer.prototype.onResume = function() {
exec(callbackMap.suc, callbackMap.err, "AppsFlyerPlugin", "resumeSDK", []);
};
AppsFlyer.prototype.setCurrencyCode = function (currencyId) {
argscheck.checkArgs('S', 'AppsFlyer.setCurrencyCode', arguments);
exec(null, null, "AppsFlyerPlugin", "setCurrencyCode", [currencyId]);
};
AppsFlyer.prototype.onResume = function() {
if(callbackMap.convSuc){
exec(callbackMap.convSuc, callbackMap.convErr, "AppsFlyerPlugin", "resumeSDK", []);
}
AppsFlyer.prototype.setAppUserId = function (customerUserId) {
argscheck.checkArgs('S', 'AppsFlyer.setAppUserId', arguments);
exec(null, null, "AppsFlyerPlugin", "setAppUserId", [customerUserId]);
};
AppsFlyer.prototype.setGCMProjectNumber = function (gcmProjectNumber) {
argscheck.checkArgs('S', 'AppsFlyer.setGCMProjectNumber', arguments);
exec(null, null, "AppsFlyerPlugin", "setGCMProjectNumber", [gcmProjectNumber]);
};
if(callbackMap.attrSuc){
exec(callbackMap.attrSuc, callbackMap.attrErr, "AppsFlyerPlugin", "registerOnAppOpenAttribution", []);
}
};
AppsFlyer.prototype.getAppsFlyerUID = function (successCB) {
argscheck.checkArgs('F', 'AppsFlyer.getAppsFlyerUID', arguments);
exec(function (result) {
successCB(result);
}, null,
"AppsFlyerPlugin",
"getAppsFlyerUID",
[]);
};
AppsFlyer.prototype.setDeviceTrackingDisabled = function (isDisabled) {
argscheck.checkArgs('*', 'AppsFlyer.setDeviceTrackingDisabled', arguments);
exec(null,null,"AppsFlyerPlugin","setDeviceTrackingDisabled", [isDisabled]);
};
AppsFlyer.prototype.setCurrencyCode = function (currencyId) {
argscheck.checkArgs('S', 'AppsFlyer.setCurrencyCode', arguments);
exec(null, null, "AppsFlyerPlugin", "setCurrencyCode", [currencyId]);
};
AppsFlyer.prototype.trackEvent = function (eventName, eventValue) {
argscheck.checkArgs('SO', 'AppsFlyer.trackEvent', arguments);
exec(null, null, "AppsFlyerPlugin", "trackEvent", [eventName, eventValue]);
};
AppsFlyer.prototype.enableUninstallTracking = function (gcmProjectNumber,successCB, errorCB) {
argscheck.checkArgs('S', 'AppsFlyer.enableUninstallTracking', arguments);
exec(successCB, errorCB, "AppsFlyerPlugin", "enableUninstallTracking", [gcmProjectNumber]);
};
AppsFlyer.prototype.setAppUserId = function (customerUserId) {
argscheck.checkArgs('S', 'AppsFlyer.setAppUserId', arguments);
exec(null, null, "AppsFlyerPlugin", "setAppUserId", [customerUserId]);
};
AppsFlyer.prototype.setGCMProjectNumber = function (gcmProjectNumber) {
argscheck.checkArgs('S', 'AppsFlyer.setGCMProjectNumber', arguments);
exec(null, null, "AppsFlyerPlugin", "setGCMProjectNumber", [gcmProjectNumber]);
};
AppsFlyer.prototype.updateServerUninstallToken = function (token) {
argscheck.checkArgs('S', 'AppsFlyer.updateServerUninstallToken', arguments);
exec(null, null, "AppsFlyerPlugin", "updateServerUninstallToken", [token]);
};
AppsFlyer.prototype.getAppsFlyerUID = function (successCB) {
argscheck.checkArgs('F', 'AppsFlyer.getAppsFlyerUID', arguments);
exec(function (result) {
successCB(result);
}, null,
"AppsFlyerPlugin",
"getAppsFlyerUID",
[]);
};
// USER INVITE TRACKING
AppsFlyer.prototype.setAppInviteOneLinkID = function (args) {
argscheck.checkArgs('S', 'AppsFlyer.setAppInviteOneLinkID', arguments);
exec(null, null, "AppsFlyerPlugin", "setAppInviteOneLinkID", [args]);
};
AppsFlyer.prototype.generateInviteLink = function (args, successCB, errorCB) {
argscheck.checkArgs('O', 'AppsFlyer.generateInviteLink', arguments);
exec(successCB, errorCB, "AppsFlyerPlugin", "generateInviteLink", [args]);
};
//CROSS PROMOTION
AppsFlyer.prototype.trackCrossPromotionImpression = function (appId, campaign) {
argscheck.checkArgs('*', "AppsFlyer.trackCrossPromotionImpression", arguments);
exec(null, null ,"AppsFlyerPlugin","trackCrossPromotionImpression", [appId, campaign]);
};
AppsFlyer.prototype.trackAndOpenStore = function (appId, campaign, params) {
argscheck.checkArgs('*', "AppsFlyer.trackAndOpenStore", arguments);
exec(null, null ,"AppsFlyerPlugin","trackAndOpenStore", [appId, campaign, params]);
};
AppsFlyer.prototype.setDeviceTrackingDisabled = function (isDisabled) {
argscheck.checkArgs('*', 'AppsFlyer.setDeviceTrackingDisabled', arguments);
exec(null,null,"AppsFlyerPlugin","setDeviceTrackingDisabled", [isDisabled]);
};
AppsFlyer.prototype.stopTracking = function (isStopTracking) {
argscheck.checkArgs('*', 'AppsFlyer.stopTracking', arguments);
exec(null,null,"AppsFlyerPlugin", "stopTracking", [isStopTracking]);
};
AppsFlyer.prototype.handleOpenUrl = function (url) {
argscheck.checkArgs('*', 'AppsFlyer.handleOpenUrl', arguments);
exec(null, null, "AppsFlyerPlugin", "handleOpenUrl", [url]);
};
AppsFlyer.prototype.trackEvent = function (eventName, eventValue) {
argscheck.checkArgs('SO', 'AppsFlyer.trackEvent', arguments);
exec(null, null, "AppsFlyerPlugin", "trackEvent", [eventName, eventValue]);
};
global.cordova.addConstructor(function () {
if (!global.Cordova) {
global.Cordova = global.cordova;
}
AppsFlyer.prototype.enableUninstallTracking = function (gcmProjectNumber,successCB, errorCB) {
argscheck.checkArgs('S', 'AppsFlyer.enableUninstallTracking', arguments);
exec(successCB, errorCB, "AppsFlyerPlugin", "enableUninstallTracking", [gcmProjectNumber]);
};
if (!global.plugins) {
global.plugins = {};
}
AppsFlyer.prototype.updateServerUninstallToken = function (token) {
argscheck.checkArgs('S', 'AppsFlyer.updateServerUninstallToken', arguments);
exec(null, null, "AppsFlyerPlugin", "updateServerUninstallToken", [token]);
};
global.plugins.appsFlyer = new AppsFlyer();
});
} (window));
// USER INVITE TRACKING
AppsFlyer.prototype.setAppInviteOneLinkID = function (args) {
argscheck.checkArgs('S', 'AppsFlyer.setAppInviteOneLinkID', arguments);
exec(null, null, "AppsFlyerPlugin", "setAppInviteOneLinkID", [args]);
};
AppsFlyer.prototype.generateInviteLink = function (args, successCB, errorCB) {
argscheck.checkArgs('O', 'AppsFlyer.generateInviteLink', arguments);
exec(successCB, errorCB, "AppsFlyerPlugin", "generateInviteLink", [args]);
};
//CROSS PROMOTION
AppsFlyer.prototype.trackCrossPromotionImpression = function (appId, campaign) {
argscheck.checkArgs('*', "AppsFlyer.trackCrossPromotionImpression", arguments);
exec(null, null ,"AppsFlyerPlugin","trackCrossPromotionImpression", [appId, campaign]);
};
AppsFlyer.prototype.trackAndOpenStore = function (appId, campaign, params) {
argscheck.checkArgs('*', "AppsFlyer.trackAndOpenStore", arguments);
exec(null, null ,"AppsFlyerPlugin","trackAndOpenStore", [appId, campaign, params]);
};
AppsFlyer.prototype.handleOpenUrl = function (url) {
argscheck.checkArgs('*', 'AppsFlyer.handleOpenUrl', arguments);
exec(null, null, "AppsFlyerPlugin", "handleOpenUrl", [url]);
};
global.cordova.addConstructor(function () {
if (!global.Cordova) {
global.Cordova = global.cordova;
}
if (!global.plugins) {
global.plugins = {};
}
global.plugins.appsFlyer = new AppsFlyer();
});
} (window));

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