Skip to content

Use the native AppsFlyer SDK's (iOS/Android) in Titanium!

License

Notifications You must be signed in to change notification settings

hansemannn/titanium-apps-flyer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Titanium AppsFlyer SDK

Use the native AppsFlyer SDK's (iOS/Android) in Titanium!

Requirements

  • iOS 12 or later
  • Android 5 or later
  • Titanium SDK 9.2.0 or later
  • An AppsFlyer account

APIs

initialize(params)

AppsFlyer.initialize({
  devKey: 'YOUR_DEV_KEY',
  appID: 'idXXXXXXXXX', // iOS only, set to your App Store ID
  authorizationTimeout: 60, // iOS only, used to defer the start() process
  debug: true
 });

start()

AppsFlyer.start();

requestTrackingAuthorization(callback) (iOS only)

AppsFlyer.requestTrackingAuthorization({ status }) => {
  // For example, status === 3 is "authorized"
});

trackingAuthorizationStatus

console.warn('AUTHORIZED: ', AppsFlyer.trackingAuthorizationStatus === 3);

fetchAdvertisingIdentifier(callback)

AppsFlyer.fetchAdvertisingIdentifier({ idfa }) => {
  // Use the IDFA (iOS) or AID (Android)
});

logEvent(params)

AppsFlyer.logEvent('my_event', { param1: 'hello', param2: 'world' });

Example

See the example/app.js for details

License

MIT

Author

Hans Knöchel