react-native-appsflyer
Advanced tools
Comparing version 1.0.3 to 1.0.5
16
index.js
@@ -20,2 +20,5 @@ | ||
/** | ||
* iOS only | ||
*/ | ||
appsFlyer.trackLocation = (longitude, latitude, callback) => { | ||
@@ -25,2 +28,4 @@ return RNAppsFlyer.trackLocation(longitude, latitude, callback); | ||
appsFlyer.trackEvent = (eventName, eventValues, successC, errorC) => { | ||
@@ -35,2 +40,13 @@ return RNAppsFlyer.trackEvent(eventName, eventValues, successC, errorC); | ||
/** | ||
* For Android only (Google API). iOS uses 'didRegisterForRemoteNotificationsWithDeviceToken' in AppDelegate.m | ||
*/ | ||
appsFlyer.setGCMProjectID = (gcmProjectId, successC, errorC) => { | ||
return RNAppsFlyer.setGCMProjectID(gcmProjectId, successC, errorC); | ||
}; | ||
/** | ||
* Accessing AppsFlyer Attribution / Conversion Data from the SDK (Deferred Deeplinking) | ||
@@ -37,0 +53,0 @@ * @param callback: contains fields: |
{ | ||
"name": "react-native-appsflyer", | ||
"version": "1.0.3", | ||
"version": "1.0.5", | ||
"description": "React Native Appsflyer plugin", | ||
@@ -14,4 +14,11 @@ "main": "index.js", | ||
}, | ||
"author": "Appsflyer", | ||
"license": "MIT License", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/AppsFlyerSDK/react-native-appsflyer.git" | ||
}, | ||
"author": "Appsflyer / Maxim Shoustin", | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/anarchicknight/react-native-appsflyer/blob/master/LICENSE" | ||
}, | ||
"homepage": "https://github.com/AppsFlyerSDK/react-native-appsflyer#readme", | ||
@@ -23,3 +30,6 @@ "keywords": [ | ||
"appsflyer" | ||
] | ||
], | ||
"bugs": { | ||
"url": "https://github.com/AppsFlyerSDK/react-native-appsflyer/issues" | ||
} | ||
} |
@@ -13,14 +13,17 @@ | ||
- [Installation](#installation) | ||
- [iOS](#ios) | ||
- [Android](#android) | ||
- [iOS](#installation_ios) | ||
- [Android](#installation_android) | ||
- [API Methods](#api-methods) | ||
- [initSdk](#appsflyerinitsdkoptions-callback-void) | ||
- [trackEvent](#appsflyertrackeventeventname-eventvalues-callback-void) | ||
- [initSdk](#initSdk) | ||
- [trackEvent](#trackEvent) | ||
- [Track App Uninstalls](#track-app-uninstalls) | ||
- [iOS](#track-app-uninstalls-ios) | ||
- [Android](#track-app-uninstalls-android) | ||
- [onInstallConversionData](#appsflyeroninstallconversiondatacallback-functionunregister) | ||
- [getAppsFlyerUID](#appsflyergetappsflyeruidcallback-void) | ||
- [trackLocation](#appsflyertracklocationlongitude-latitude-callbackerror-coords-void-ios-only) | ||
- [trackLocation (ios only)](#appsflyertracklocationlongitude-latitude-callbackerror-coords-void-ios-only) | ||
- [Demo](#demo) | ||
## This plugin is built for | ||
## <a id="this-plugin-is-built-for"> This plugin is built for | ||
@@ -30,7 +33,7 @@ - iOS AppsFlyerSDK **v4.5.9** | ||
## Installation | ||
## <a id="installation"> Installation | ||
`$ npm install react-native-appsflyer --save` | ||
### iOS | ||
### <a id="installation_ios"> iOS | ||
@@ -64,3 +67,3 @@ | ||
### Android | ||
### <a id="installation_android"> Android | ||
@@ -113,3 +116,3 @@ ##### **android/app/build.gradle** | ||
##API Methods | ||
## <a id="api-methods"> API Methods | ||
@@ -125,3 +128,3 @@ --- | ||
#####**`appsFlyer.initSdk(options, callback): void`** | ||
##### <a id="initSdk"> **`appsFlyer.initSdk(options, callback): void`** | ||
@@ -163,3 +166,3 @@ initializes the SDK. | ||
#####**`appsFlyer.trackEvent(eventName, eventValues, callback): void`** | ||
#####<a id="trackEvent"> **`appsFlyer.trackEvent(eventName, eventValues, callback): void`** | ||
@@ -201,2 +204,52 @@ | ||
### <a id="track-app-uninstalls"> Track App Uninstalls | ||
#### <a id="track-app-uninstalls-ios"> iOS | ||
AppsFlyer enables you to track app uninstalls. To handle notifications it requires to modify your `AppDelegate.m`. Use [didRegisterForRemoteNotificationsWithDeviceToken](https://developer.apple.com/reference/uikit/uiapplicationdelegate) to register to the uninstall feature. | ||
*Example:* | ||
```objective-c | ||
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { | ||
// notify AppsFlyerTracker | ||
[[AppsFlyerTracker sharedTracker] registerUninstall:deviceToken]; | ||
} | ||
``` | ||
Read more about Uninstall register: [Appsflyer SDK support site](https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS) | ||
#### <a id="track-app-uninstalls-android"> Android | ||
`setGCMProjectID(GCMProjectID): void` | ||
Set the GCM API key. AppsFlyer requires a Google Project Number and GCM API Key to enable uninstall tracking. | ||
| parameter | type | description | | ||
| ----------- |-----------------------------|--------------| | ||
| `GCMProjectID` | `String` | | | ||
*Example:* | ||
```javascript | ||
setGCMProjectID(){ | ||
const gcmProjectId = "987186475229"; | ||
appsFlyer.setGCMProjectID(gcmProjectId, | ||
(gcmProjectID) => { | ||
//... | ||
}, | ||
(error) => { | ||
console.error(error); | ||
}) | ||
} | ||
``` | ||
Read more about Android Uninstall Tracking: [Appsflyer SDK support site](https://support.appsflyer.com/hc/en-us/articles/208004986-Android-Uninstall-Tracking) | ||
--- | ||
#####**`appsFlyer.onInstallConversionData(callback): function:unregister`** | ||
@@ -206,2 +259,4 @@ | ||
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-) | ||
| parameter | type | description | | ||
@@ -212,3 +267,3 @@ | ----------- |-----------------------------|--------------| | ||
##### callback structure: {#callback-structure} | ||
##### callback structure: | ||
@@ -215,0 +270,0 @@ - `status`: `"success"`or `"failure"` if SDK returned error on `onInstallConversionData` event handler |
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
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 repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
25
70
0
374
0
181806