1.2.6 • Published 9 years ago
react-native-apps-flyer v1.2.6
react-native-apps-flyer
This React Native Library uses the AppsFlyer 4.6.0 library for both iOS and Android
Installation
$ npm install react-native-apps-flyer --save
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-apps-flyerand addRNAppsFlyer.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNAppsFlyer.ato your project'sBuild Phases➜Link Binary With Libraries - Install the appsFlyerFramework pod file from their website. Uncomment
use_frameworks!in the Podfile. - Run your project (
Cmd+R)
Android
MainApplication.java
- import
import com.ppsreejith.RNAppsFlyerPackage; - In the
getPackages()method register the modulenew RNAppsFlyerPackage(MainApplication.this)
android/app/build.gradle
- Add the project to your dependencies
dependencies {
...
compile project(':react-native-apps-flyer')
}android/settings.gradle
- Add the project
include ':react-native-apps-flyer'
project(':react-native-apps-flyer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-apps-flyer/android')Usage
import af from 'react-native-apps-flyer';
af.init(appId, devKey, function(err) {
});
// To get appsFlyerUID,
af.getAppsFlyerUID(function(err, uid) {
});
//To trigger an event
af.trackEvent(eventName, {key1: value1, key2: value2}, function(err, events) {
// events is {key1: value1, key2, value2}
});iOS only
import af from 'react-native-apps-flyer';
// To track location with lat and long * note lat and long should be floats only,
af.trackLocation(last, long, function(err, data) {
});
})DEPRECATED
// iOS
af.sendTrackingWithEvent(eventName, {key1: value1, key2: value2}, function(err, events) {
// events is {key1: value1, key2, value2}
});
// Android
af.sendTrackingWithEvent(eventName);1.2.6
9 years ago
1.2.5
9 years ago
1.2.4
9 years ago
1.2.3
9 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.11
10 years ago
1.0.10
10 years ago
1.0.9
10 years ago
1.0.8
10 years ago
1.0.7
10 years ago
1.0.6
10 years ago
1.0.5
10 years ago
1.0.3
10 years ago
1.0.2
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago