Skip to content

huiseoul/react-native-apps-flyer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-apps-flyer

This React Natie Library uses the AppsFlyer 4.6.0 library for both iOS and Android

Installation

$ npm install react-native-apps-flyer --save

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-apps-flyer and add RNAppsFlyer.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNAppsFlyer.a to your project's Build PhasesLink Binary With Libraries
  4. Install the appsFlyerFramework pod file from their website. Uncomment use_frameworks! in the Podfile.
  5. Run your project (Cmd+R)

Android

MainApplication.java
  1. import import com.ppsreejith.RNAppsFlyerPackage;
  2. In the getPackages() method register the module new RNAppsFlyerPackage(MainApplication.this)
build.gradle
  1. Add the project to your dependencies compile project(':react-native-apps-flyer')
settings.gradle
  1. 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) {

});
})

DEPRICATED

// iOS
af.sendTrackingWithEvent(eventName, {key1: value1, key2: value2}, function(err, events) {
    // events is {key1: value1, key2, value2}
});

// Android
af.sendTrackingWithEvent(eventName);

About

A react native wrapper for AppsFlyer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 45.8%
  • Java 36.8%
  • C# 14.5%
  • Ruby 2.4%
  • JavaScript 0.5%