Comparing version 4.2.9 to 4.2.10
{ | ||
"name": "appsflyer", | ||
"version": "4.2.9", | ||
"description": "Cordova AppsFlyer SDK Plugin", | ||
"version": "4.2.10", | ||
"description": "Cordova AppsFlyer Plugin", | ||
"cordova": { | ||
"id": "cordova-plugin-appsflyer-sdk", | ||
"id": "com.appsflyer.phonegap.plugins.appsflyer", | ||
"platforms": [ | ||
@@ -14,3 +14,3 @@ "android", | ||
"type": "git", | ||
"url": "git+https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk.git" | ||
"url": "git+https://github.com/AppsFlyerSDK/PhoneGap.git" | ||
}, | ||
@@ -36,14 +36,14 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/issues" | ||
"url": "https://github.com/AppsFlyerSDK/PhoneGap/issues" | ||
}, | ||
"homepage": "https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk#readme", | ||
"homepage": "https://github.com/AppsFlyerSDK/PhoneGap#readme", | ||
"scripts": { | ||
"test": "npm run jshint", | ||
"jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests", | ||
"preparedemo": "cd examples/demoA; cordova plugin rm cordova-plugin-appsflyer-sdk --save; cordova plugin add ../.. --save", | ||
"setup": "cd examples/demoA; npm install; cd ../..; npm run preparedemo;", | ||
"demo.ra": "cd examples/demoA; ionic run android", | ||
"demo.ba": "cd examples/demoA; ionic build android", | ||
"demo.ri": "cd examples/demoA; ionic run ios", | ||
"demo.bi": "cd examples/demoA; ionic build ios" | ||
"preparedemo": "cd examples/demoAngular; cordova plugin rm com.appsflyer.phonegap.plugins.appsflyer --save; cordova plugin add ../.. --save", | ||
"setup": "cd examples/demoAngular; npm install; cd ../..; npm run preparedemo;", | ||
"demo.ra": "cd examples/demoAngular; ionic run android", | ||
"demo.ba": "cd examples/demoAngular; ionic build android", | ||
"demo.ri": "cd examples/demoAngular; ionic run ios", | ||
"demo.bi": "cd examples/demoAngular; ionic build ios" | ||
}, | ||
@@ -50,0 +50,0 @@ "devDependencies": { |
<img src="https://www.appsflyer.com/wp-content/themes/ohav-child/images/logo.svg" width="200"> | ||
# Cordova AppsFlyer plugin for Android and iOS. [![npm version](https://badge.fury.io/js/cordova-plugin-appsflyer-sdk.svg)](https://badge.fury.io/js/cordova-plugin-appsflyer-sdk) [![Build Status](https://travis-ci.org/AppsFlyerSDK/cordova-plugin-appsflyer-sdk.svg?branch=master)](https://travis-ci.org/AppsFlyerSDK/cordova-plugin-appsflyer-sdk) | ||
# Cordova/PhoneGap AppsFlyer plugin for Android and iOS. [![npm version](https://badge.fury.io/js/appsflyer.svg)](https://badge.fury.io/js/appsflyer) [![Build Status](https://travis-ci.org/AppsFlyerSDK/PhoneGap.svg?branch=master)](https://travis-ci.org/AppsFlyerSDK/PhoneGap) | ||
@@ -25,2 +25,3 @@ | ||
- [getAppsFlyerUID](#getAppsFlyerUID) | ||
- [onInstallConversionDataLoaded](#onInstallConversionDataLoaded) | ||
- [Deep linking Tracking](#deep-linking-tracking) | ||
@@ -36,2 +37,3 @@ - [Android](#dl-android) | ||
`Cordova >= 4.3.x.` | ||
@@ -48,3 +50,3 @@ | ||
``` | ||
$ cordova plugin add cordova-plugin-appsflyer-sdk | ||
$ cordova plugin add appsflyer | ||
``` | ||
@@ -54,3 +56,3 @@ or directly from git: | ||
``` | ||
$ cordova plugin add https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk.git | ||
$ cordova plugin add https://github.com/AppsFlyerSDK/PhoneGap.git | ||
``` | ||
@@ -164,3 +166,2 @@ | ||
| `isDebug` |`boolean`| `false` | debug mode (optional)| | ||
| `onInstallConversionDataListener` |`boolean`| `false` | Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). Read more: [Android](http://support.appsflyer.com/entries/69796693-Accessing-AppsFlyer-Attribution-Conversion-Data-from-the-SDK-Deferred-Deep-linking-), [iOS](http://support.appsflyer.com/entries/22904293-Testing-AppsFlyer-iOS-SDK-Integration-Before-Submitting-to-the-App-Store-) AppsFlyer plugin will fire `onInstallConversionData` event with attribution data. | ||
@@ -180,4 +181,3 @@ *Example:* | ||
appId: '123456789', | ||
isDebug: false, | ||
onInstallConversionDataLoaded: true | ||
isDebug: false | ||
}; | ||
@@ -200,3 +200,3 @@ window.plugins.appsFlyer.initSdk(options, onSuccess, onError); | ||
| ----------- |-----------------------------|--------------| | ||
| `eventName` | `String` | custom event name, is presented in your dashboard. See the Event list [HERE](https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/blob/master/platform/ios/AppsFlyerTracker.h) | | ||
| `eventName` | `String` | custom event name, is presented in your dashboard. See the Event list [HERE](https://github.com/AppsFlyerSDK/PhoneGap/blob/master/platform/ios/AppsFlyerTracker.h) | | ||
| `eventValue` | `Object` | event details | | ||
@@ -302,2 +302,26 @@ | ||
##### <a id="onInstallConversionDataLoaded"> **`onInstallConversionDataLoaded(conversionData): void`** | ||
Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking). | ||
Read more: [Android](http://support.appsflyer.com/entries/69796693-Accessing-AppsFlyer-Attribution-Conversion-Data-from-the-SDK-Deferred-Deep-linking-), [iOS](http://support.appsflyer.com/entries/22904293-Testing-AppsFlyer-iOS-SDK-Integration-Before-Submitting-to-the-App-Store-) | ||
**Note:** AppsFlyer plugin will fire `onInstallConversionDataLoaded` event with attribution data. You must implement `onInstallConversionDataLoaded` listener to receive the data. | ||
| parameter | type | description | | ||
| ----------- |-----------------------------|--------------| | ||
| `conversionData` | `Object` | | | ||
*Example:* | ||
```javascript | ||
document.addEventListener('onInstallConversionDataLoaded', function(e){ | ||
var attributionData = (JSON.stringify(e.detail)); | ||
alert(attributionData); | ||
}, false); | ||
``` | ||
### <a id="deep-linking-tracking"> Deep linking Tracking | ||
@@ -330,3 +354,3 @@ | ||
This plugin has a `examples` folder with `demoA` (Angular 1) project bundled with it. To give it a try , clone this repo and from root a.e. `cordova-plugin-appsflyer-sdk` execute the following: | ||
This plugin has a `examples` folder with `demoAngular` project bundled with it. To give it a try , clone this repo and from root a.e. `PhoneGap` execute the following: | ||
@@ -338,7 +362,7 @@ ```sh | ||
- `npm run demo.ra` - runs Android | ||
- `npm run demo.ba` - builds Android | ||
- `npm run demo.ri` - runs iOS | ||
- `npm run demo.bi` - builds iOS | ||
- `demo.ba` - builds Android | ||
- `demo.ri` - runs iOS | ||
- `demo.bi` - builds iOS | ||
![demo printscreen](examples/demo_example.png?raw=true) |
# Release Notes | ||
### 4.2.9 (Nov 25, 2016) | ||
* moved from PhoneGap to cordova-plugin-appsflyer-sdk | ||
* onInstallConversionDataListener added to `initSdk` | ||
* DOCs fixes | ||
# Release Notes | ||
### 4.2.7 (Nov 14, 2016) | ||
@@ -9,0 +3,0 @@ * changed isDebug to default false |
@@ -7,4 +7,2 @@ | ||
//var eventsMap = {}; | ||
if (!window.CustomEvent) { | ||
@@ -35,3 +33,2 @@ window.CustomEvent = function (type, config) { | ||
// args.onInstallConversionDataListener = (eventsMap['onInstallConversionData']) ? true: false; | ||
exec(successCB, errorCB, "AppsFlyerPlugin", "initSdk", [args]); | ||
@@ -41,45 +38,2 @@ } | ||
// AppsFlyer.prototype.onInstallConversionDataN = function(callback) { | ||
// console.log("onInstallConversionDataN is called" ); | ||
// const listener = NativeAppEventEmitter.addListener('onInstallConversionData', | ||
// function(_data){ | ||
// if(callback && typeof(callback) === typeof(Function)){ | ||
// try{ | ||
// let data = JSON.parse(_data); | ||
// callback(data); | ||
// } | ||
// catch(_error){ | ||
// callback(new AFParseJSONException("Invalid data structure", _data)); | ||
// } | ||
// } | ||
// } | ||
// ); | ||
// }; | ||
// AppsFlyer.prototype.onInstallConversionData = function (conversionData) { | ||
// console.log("onInstallConversionData is called" ); | ||
// var data = conversionData,event; | ||
// if (typeof data === "string") { | ||
// data = JSON.parse(conversionData); | ||
// } | ||
// event = new CustomEvent('onInstallConversionData', {'detail': data}); | ||
// global.document.dispatchEvent(event); | ||
// eventsMap['onInstallConversionData'] = listener; | ||
// // unregister listener | ||
// return function remove() { | ||
// console.log("onInstallConversionData listener.remove()" ); | ||
// listener.remove(); | ||
// }; | ||
// }; | ||
AppsFlyer.prototype.setCurrencyCode = function (currencyId) { | ||
@@ -117,7 +71,12 @@ argscheck.checkArgs('S', 'AppsFlyer.setCurrencyCode', arguments); | ||
AppsFlyer.prototype.onInstallConversionDataLoaded = function (conversionData) { | ||
var data = conversionData, | ||
event; | ||
if (typeof data === "string") { | ||
data = JSON.parse(conversionData); | ||
} | ||
event = new CustomEvent('onInstallConversionDataLoaded', {'detail': data}); | ||
global.document.dispatchEvent(event); | ||
}; | ||
global.cordova.addConstructor(function () { | ||
@@ -136,9 +95,2 @@ if (!global.Cordova) { | ||
function AFParseJSONException(_message, _data) { | ||
this.message = _message; | ||
this.data = _data; | ||
this.name = "AFParseJSONException"; | ||
} | ||
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
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
358
2085733
20
283
2
1