
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
cordova-plugin-appsflyer-sdk
Advanced tools
❗️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
🛠 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.
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
Great installation and setup guides can be viewed here.
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);
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 using track
So the latest version that can work with Ionic-Native for now is 5.4.30
In case you are using Ionic framework, you have 2 options:
run this commands: With Cordova:
$ ionic cordova plugin add cordova-plugin-appsflyer-sdk
$ npm install @ionic-native/appsflyer
With Capacitor:
$ npm install cordova-plugin-appsflyer-sdk
$ npm install @ionic-native/appsflyer
ionic cap sync
Then add the following to app.module.ts
import { Appsflyer } from "@ionic-native/appsflyer/ngx";
...
providers: [
Appsflyer,
...,
]
and in your main ts file:
import { Appsflyer } from '@ionic-native/appsflyer/ngx';
import {Platform} from '@ionic/angular';
constructor(private appsflyer: Appsflyer, public platform: Platform) {
...
this.platform.ready().then(() => {
this.appsflyer.initSdk(options);
});
}
If you're using Ionic 2/3, you'd need to install a previous version of the Ionic Native dependency (notice the @4 at the end of the npm install command):
$ ionic cordova plugin add cordova-plugin-appsflyer-sdk
$ npm install @ionic-native/appsflyer@4
Then add the following to app.module.ts
(with no /ngx)
import { Appsflyer } from "@ionic-native/appsflyer";
...
providers: [
Appsflyer,
...,
]
And finally in your main ts file:
import { Appsflyer } from '@ionic-native/appsflyer';
window
object directlyYou can use the plugin the same way like in Cordova with only one exception:
instead of window.plugins...
use window['plugins']...
Check out the full API for more information
FAQs
Cordova AppsFlyer SDK Plugin
The npm package cordova-plugin-appsflyer-sdk receives a total of 2,067 weekly downloads. As such, cordova-plugin-appsflyer-sdk popularity was classified as popular.
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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.