Integration

Basic integration of the SDK

Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates.

SettingDescription
devKeyYour application devKey provided by AppsFlyer (required)
appIdApp ID (iOS only) you configured in your AppsFlyer dashboard
isDebugDebug mode - set to true for testing only
onInstallConversionDataListenerSet listener for GCD response (Optional. default=true)
onDeepLinkListenerSet listener for UDL response (Optional. default=false)
timeToWaitForATTUserAuthorizationWaits for request user authorization to access app-related data. please read more here
import appsFlyer from 'react-native-appsflyer';

appsFlyer.initSdk(
  {
    devKey: 'K2***********99',
    isDebug: false,
    appId: '41*****44',
    onInstallConversionDataListener: true, //Optional
    onDeepLinkListener: true, //Optional
    timeToWaitForATTUserAuthorization: 10 //for iOS 14.5
  },
  (result) => {
    console.log(result);
  },
  (error) => {
    console.error(error);
  }
);