6.15.3 • Published 4 months ago

cordova-plugin-appsflyer-sdk v6.15.3

Weekly downloads
1,896
License
MIT
Repository
github
Last release
4 months ago

❗️Important

  • Cordova AppsFlyer plugin version 4.4.0 and higher are meant to be used with cordova-android@7.0.0 and up
    For lower versions of cordova-android please use plugin version 4.3.3 available @ https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/tree/4.3.3
  • From version 6.1.10 the plugin uses cocoapods(NOT StaticLib) in order to support iOS app-kids Strict mode.
    You can read more here
  • From version 6.10.2 the plugin requires using the implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.20' in Android.
  • From version 6.14.3 the plugin requires Target version 12 and higher in iOS.
  • From version 6.15.11 the plugin requires adding the value '/usr/lib/swift' to Build Settings 'RunPath Search Paths' key in iOS.

Table of content

This plugin is built for

  • iOS AppsFlyerSDK v6.15.1
  • Android AppsFlyerSDK v6.15.0

❗v6.15.11 Breaking Changes

iOS platform: The plugin requires adding the value '/usr/lib/swift' to Build Settings 'RunPath Search Paths' key in iOS, Otherwise there might be some compilation errors.

❗v6.14.3 Breaking Changes

Android platform: In order to receive data regarding install-referrer from AppGallery now, there is a need to add implementation to the gradle file. following the instructions in [this](https://dev.appsflyer.com/hc/docs/install-android-sdk#huawei-install-referrer) link. please follow also these Cordova doc guidlines [here](https://cordova.apache.org/docs/en/11.x/guide/platforms/android/#extending-buildgradle).

❗v6 Breaking Changes

We have renamed the following APIs:

Old APINew API
trackEventlogEvent
stopTrackingStop
trackCrossPromotionImpressionlogCrossPromotionImpression
trackAndOpenStorelogCrossPromotionAndOpenStore
setDeviceTrackingDisabledanonymizeUser

📲Installation

$ cordova plugin add cordova-plugin-appsflyer-sdk  

To install cordova manually check out the doc [here](/docs/Installation.md).

NOTE: for Ionic installation see [this](#ionic) section

⚠️ Adding AD_ID permission for Android ⚠️

In v6.8.0 of the AppsFlyer SDK, we added the normal permission com.google.android.gms.permission.AD_ID to the SDK's AndroidManifest, to allow the SDK to collect the Android Advertising ID on apps targeting API 33. If your app is targeting children, you need to revoke this permission to comply with Google's Data policy. You can read more about it [here](https://dev.appsflyer.com/hc/docs/install-android-sdk#the-ad_id-permission).

👨‍👩‍👧‍👦 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)
Change to Strict mode
After you [installed](#installation) the AppsFlyer plugin, go to the ios folder inside platform folder:

cd platform/ios  

open the Podfile and replace pod 'AppsFlyerFramework', '6.1.1' with pod 'AppsFlyerFramework/Strict', '6.1.1'

Run pod install inside the ios folder

inside xcode, go to your target and define Preprocessor Macro AFSDK_NO_IDFA=1
Add Preprocessor macro

  • You can add the Preprocessor Macro using our [Hooks](/docs/Hooks.md).

Change to Regular mode
Go to the ios folder inside platform folder:

cd platform/ios  

open the Podfile and replace pod 'AppsFlyerFramework/Strict', '6.1.1' with pod 'AppsFlyerFramework', '6.1.1'

Run pod install inside the ios folder

inside xcode, go to your target and remove the Preprocessor Macro AFSDK_NO_IDFA=1

📖 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#uninstall)
  • [Set plugin for IOS 14](/docs/Guides.md#ios14)
  • [Send SKAN postback copies for IOS 15](/docs/Guides.md#skanPostback)

🚀 Setup

Set your App_ID (iOS only), Dev_Key and enable AppsFlyer to detect installations, sessions (app opens) and updates. > This is the minimum requirement to start tracking your app installs and is already implemented in this plugin. You MUST modify this call and provide:

devKey - Your application devKey provided by AppsFlyer.
appId - For iOS only. Your iTunes Application ID.
waitForATTUserAuthorization - For iOS14 only. Time for the sdk to wait before launch.

Add the following lines to your code to be able to initialize tracking with your own AppsFlyer dev key:

document.addEventListener('deviceready', function() {  
  
  window.plugins.appsFlyer.initSdk({  
  devKey: 'K2***************99', // your AppsFlyer devKey  
  isDebug: false,  
  appId: '41*****44', // your ios appID  
  waitForATTUserAuthorization: 10, //time for the sdk to wait before launch - IOS 14 ONLY!  
 }, (result) => {  console.log(result);  
 }, (error) => {  console.error(error);  
 } );  }, false);  

📑 API

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

📱 Demo

Check out the demo for this project [here](docs/Guides.md#demo).
There is 1 demo project called demoC, run npm run setup_c in the appsflyer-cordova-plugin folder and then open the ios project in Xcode to see implementation for IOS 14.
Check out our Sample-App Let's cook! [here](https://github.com/AppsFlyerSDK/appsflyer-cordova-app) if you want to implement our SDK inside React-Cordova app

📍 Ionic

NOTICE! In AppsFlyer Cordova plugin version 6.x.x we replaced the word track with log from all our api but Ionic-Navite Appsflyer plugin still uses track
So the latest version that can work with Ionic-Native for now is 5.4.30

Using the window object directly

Install the cordova plugin:

$ ionic cordova plugin add cordova-plugin-appsflyer-sdk  

In your main ts file, declare a window variable:

declare var window;  

Now you can use the AppsFlyer plugin directly from cordova:

import {Component} from '@angular/core';  
import {Platform} from '@ionic/angular';  
  
declare var window;  
...  
export class HomePage {  
  constructor(public platform: Platform) {  
  this.platform.ready().then(() => {  
  window.plugins.appsFlyer.initSdk(options, success, error);  
 }); }}  

Check out the full [API](/docs/API.md) for more information

6.15.11-rc3

4 months ago

6.15.3

6 months ago

6.15.3-rc3

6 months ago

6.15.3-rc2

6 months ago

6.15.3-rc1

6 months ago

6.15.11-rc1

9 months ago

6.15.11

9 months ago

6.15.1

9 months ago

6.15.1-rc1

9 months ago

6.15.1-rc2

9 months ago

6.15.1-rc3

9 months ago

6.15.1-rc4

9 months ago

6.15.0-rc3

9 months ago

6.15.0-rc1

10 months ago

6.14.3-rc1

1 year ago

6.14.3

1 year ago

6.13.1

1 year ago

6.13.1-rc3

1 year ago

6.13.1-rc2

1 year ago

6.13.1-rc1

1 year ago

6.13.0

1 year ago

6.13.0-rc1

1 year ago

6.12.2

2 years ago

6.12.1

2 years ago

6.12.10

2 years ago

6.12.2-rc3

2 years ago

6.12.2-rc2

2 years ago

6.12.10-rc1

2 years ago

6.12.10-rc3

2 years ago

6.12.1-rc3

2 years ago

6.12.10-rc2

2 years ago

6.12.1-rc2

2 years ago

6.12.10-rc4

2 years ago

6.10.31-rc4

2 years ago

6.10.31-rc3

2 years ago

6.10.4-rc1

2 years ago

6.10.31

2 years ago

6.10.3-rc1

2 years ago

6.10.3-rc7

2 years ago

6.10.3-rc6

2 years ago

6.10.3-rc5

2 years ago

6.10.2

2 years ago

6.10.3

2 years ago

6.8.0-rc1

3 years ago

6.8.0

3 years ago

6.8.2

3 years ago

6.8.2-rc1

3 years ago

6.4.4

3 years ago

6.5.2

3 years ago

6.4.0

4 years ago

6.3.50

4 years ago

6.3.31

4 years ago

6.3.30

4 years ago

6.3.20

4 years ago

6.3.0

4 years ago

6.2.60

4 years ago

6.2.42

4 years ago

6.2.41

4 years ago

6.2.40

4 years ago

6.2.30

4 years ago

6.2.20

4 years ago

6.2.10

4 years ago

6.2.0

4 years ago

6.1.30

4 years ago

6.1.20

4 years ago

6.1.11

4 years ago

6.1.10

5 years ago

6.0.54

5 years ago

6.0.53

5 years ago

6.0.52

5 years ago

6.0.51

5 years ago

6.0.50

5 years ago

6.0.30

5 years ago

5.4.31

5 years ago

6.0.20

5 years ago

5.4.30

5 years ago

5.4.10

5 years ago

5.4.0

5 years ago

5.2.2

5 years ago

5.2.1

5 years ago

5.2.0

5 years ago

4.4.26

5 years ago

4.4.25

6 years ago

4.4.24

6 years ago

4.4.23

6 years ago

4.4.22

6 years ago

4.4.21

6 years ago

4.4.20

6 years ago

4.4.19

6 years ago

4.4.18

6 years ago

4.4.17

6 years ago

4.4.16

6 years ago

4.3.3

6 years ago

4.4.15

6 years ago

4.4.14

6 years ago

4.4.13

6 years ago

4.4.12

7 years ago

4.4.11

7 years ago

4.4.10

7 years ago

4.4.9

7 years ago

4.4.8

7 years ago

4.4.7

7 years ago

4.4.6

7 years ago

4.4.5

7 years ago

4.4.3

7 years ago

4.4.2

7 years ago

4.4.0

7 years ago

4.3.0

8 years ago

4.2.28

8 years ago

4.2.27

8 years ago

4.2.26

8 years ago

4.2.25

8 years ago

4.2.24

8 years ago

4.2.23

8 years ago

4.2.22

8 years ago

4.2.21

8 years ago

4.2.20

8 years ago

4.2.19

8 years ago

4.2.18

8 years ago

4.2.17

8 years ago

4.2.16

8 years ago

4.2.15

8 years ago

4.2.14

8 years ago

4.2.13

9 years ago

4.2.12

9 years ago

4.2.11

9 years ago

4.2.10

9 years ago

4.2.9

9 years ago