6.6.0 โ€ข Published 2 years ago

npmtestforbm v6.6.0

Weekly downloads
21
License
MIT
Repository
github
Last release
2 years ago

React Native AppsFlyer plugin for Android and iOS.

test ๐Ÿ›  In order for us to provide optimal support, we would kindly ask you to submit any issues to support@appsflyer.com

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.

this is readme npm version License: MIT Downloads

Table of content

This plugin is built for

  • iOS AppsFlyerSDK v6.4.3
  • Android AppsFlyerSDK v6.4.3

โ— Breaking Changes

  • From version 6.3.0, we use xcframework for iOS platform, then you need to use cocoapods version >= 1.10

  • From version 6.2.30, logCrossPromotionAndOpenStore api will register as af_cross_promotion instead of af_app_invites in your dashboard. Click on a link that was generated using generateInviteLink api will be register as af_app_invites.

  • We have renamed the following APIs:

Old APINew API
trackEventlogEvent
trackLocationlogLocation
stopTrackingstop
trackCrossPromotionImpressionlogCrossPromotionImpression
trackAndOpenStorelogCrossPromotionAndOpenStore
setDeviceTrackingDisabledanonymizeUser
AppsFlyerTrackerAppsFlyerLib

And removed the following ones:

  • trackAppLaunch -> no longer needed. See new init guide
  • sendDeepLinkData -> no longer needed. See new init guide
  • enableUninstallTracking -> no longer needed. See new uninstall measurement guide

If you have used 1 of the removed APIs, please check the integration guide for the updated instructions

๐Ÿ“ฒ Adding the SDK to your project

Production version from npm:

$ npm install react-native-appsflyer --save

Then run the following:

iOS

$ cd ios && pod install
$ react-native run-ios

Android

$ react-native run-android

Starting from RN [v0.60](https://facebook.github.io/react-native/blog/2019/07/03/version-60), and react-native-appsflyer v1.4.7 the plugin uses [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md). If your app does not support autolinking, check out the Installation Guide [here](./Docs/Installation.md).

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Add or Remove Strict mode for App-kids

Starting from version 6.1.10 iOS SDK comes in two variants: Strict mode and Regular mode. Please read more [here](https://support.appsflyer.com/hc/en-us/articles/207032066#integration-strict-mode-sdk) Version <= 6.3.0: read this section of the README.md in branch: releases/6.x.x/6.3.x/6.3.0 Change to Strict mode 1. After you [installed](#installation) the AppsFlyer plugin, add $RNAppsFlyerStrictMode=true in the project's Podfile:

//MyRNApp/ios/Podfile
...
use_frameworks!
  $RNAppsFlyerStrictMode=true

  # Pods for MyRNApp
...
  1. In the ios folder of your root project Run pod install

Change to Regular mode 1. Remove $RNAppsFlyerStrictMode=true from the project's Podfile or set it to $RNAppsFlyerStrictMode=false

  1. In the ios folder of your root project Run pod install

๐Ÿš€ Initializing the SDK

Initialize the SDK to enable AppsFlyer to detect installations, sessions (app opens) and updates. NOTE! for iOS 14.5, we use timeToWaitForATTUserAuthorization parameter. Please read more [here](https://support.appsflyer.com/hc/en-us/articles/207032066-iOS-SDK-V6-X-integration-guide-for-developers#integration-33-configuring-app-tracking-transparency-att-support)

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
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);
  }
);
SettingDescription
devKeyYour application [devKey](https://support.appsflyer.com/hc/en-us/articles/211719806-Global-app-settings-#sdk-dev-key) provided by AppsFlyer (required)
appIdYour iTunes [application ID](https://support.appsflyer.com/hc/en-us/articles/207377436-Adding-a-new-app#available-in-the-app-store-google-play-store-windows-phone-store) (iOS only)
isDebugDebug mode - set to true for testing only
onInstallConversionDataListenerSet listener for SDK init response (Optional. default=true)
onDeepLinkListenerSet listener for DDL response (Optional. default=false)
timeToWaitForATTUserAuthorizationTime for the sdk to wait before launch. please read more [Here](https://support.appsflyer.com/hc/en-us/articles/207032066-iOS-SDK-V6-X-integration-guide-for-developers#additional-apis-configuring-app-tracking-transparency-att-support)

๐Ÿ“– Guides

Great installation and setup guides can be viewed [here](/Docs/Guides.md).

  • [init SDK Guide](/Docs/Guides.md#init-sdk)
  • [Deeplinking Guide](/Docs/Guides.md#deeplinking)
  • [Uninstall Guide](/Docs/Guides.md#measure-app-uninstalls)

๐Ÿ“‘ API

See the full [API](/Docs/API.md) available for this plugin.

6.6.0-rc1

2 years ago

6.6.0-rc2

2 years ago

6.6.0-rc3

2 years ago

6.6.0-rc4

2 years ago

6.6.0-rc5

2 years ago

6.5.21

2 years ago

6.6.0

2 years ago

6.5.21-rc1

2 years ago

6.4.30

2 years ago

6.1.26

3 years ago

6.1.25

3 years ago

6.1.8

3 years ago

6.1.6

3 years ago

6.1.7

3 years ago

6.1.5

3 years ago

6.1.2

3 years ago

6.1.4

3 years ago

6.1.3

3 years ago

6.1.1

4 years ago

6.0.5

4 years ago

5.4.5

4 years ago

5.4.4

4 years ago

5.4.35

4 years ago

5.4.34

4 years ago

5.4.33

4 years ago

5.4.32

4 years ago

5.4.31

4 years ago

5.4.30

4 years ago

6.0.30

4 years ago

1.0.0

4 years ago