Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
cordova-plugin-appsflyer-sdk
Advanced tools
🛠 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 , reproduction steps, code snippets, logs, and any additional relevant information.
Please check out our brand new Capacitor plugin.
This plugin is not 100% compatible for use with Capacitor! To use this plugin with Capacitor, you have to make changes and customize the code by yourself. (Feel free to fork the project)
❗️Important
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.
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 link.
please follow also these Cordova doc guidlines here.
We have renamed the following APIs:
Old API | New API |
---|---|
trackEvent | logEvent |
stopTracking | Stop |
trackCrossPromotionImpression | logCrossPromotionImpression |
trackAndOpenStore | logCrossPromotionAndOpenStore |
setDeviceTrackingDisabled | anonymizeUser |
$ cordova plugin add cordova-plugin-appsflyer-sdk
To install cordova manually check out the doc here.
NOTE: for Ionic installation see this section
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.
Starting from version 6.1.10 iOS SDK comes in two variants: Strict mode and Regular mode. Please read more here
Change to Strict mode
After you installed 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
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
Great installation and setup guides can be viewed here.
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);
See the full API available for this plugin.
Check out the demo for this project here.
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 if you want to implement our SDK inside React-Cordova app
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
window
object directlyInstall 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 for more information
FAQs
Cordova AppsFlyer SDK Plugin
We found that cordova-plugin-appsflyer-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.