Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
nativescript-plugin-appsflyer
Advanced tools
Nativescript Library for AppsFlyer SDK
v6.14.3
iOS Minimum deployment target: 12 , Android minSdk: 19
v6.5.4
Android: deepLinkResult will return an object instead of a string
$ tns plugin add nativescript-plugin-appsflyer
Huawei Referrer is supported in SDK v6.14.0 and above. Due to changes in the Huawei AppGallery store, previous versions of the AppsFlyer SDK are not able to fetch the referrer from the store. Learn more.
Call module by adding (native javascript):
var appsFlyer = require("nativescript-plugin-appsflyer");
appsFlyer.initSdk(options, callback): void
initializes the SDK.
parameter | type | description |
---|---|---|
options | Object | SDK configuration |
options
name | type | default | description |
---|---|---|---|
devKey | string | Appsflyer Dev key | |
appId | string | Apple Application ID (for iOS only) | |
isDebug | boolean | false | debug mode (optional) |
onConversionDataSuccess | function | AppsFlyer allows you to access the user attribution data in real-time for every new install, directly from the SDK level. By doing this you can serve users with personalized content or send them to specific activities within the app, which can greatly enhance their engagement with your app. For Android; for iOS | |
onConversionDataFailure | function |
Example:
var options = {
devKey: 'WdpTVAcYwmxsaQ4WeTspmh',
appId: "975313579",
isDebug: true,
timeToWaitForATTUserAuthorization: 60,
onConversionDataSuccess: function(_res){
console.log(JSON.stringify(_res));
},
onConversionDataFailure: function(_res){
console.warn("failure: " + JSON.stringify(_res));
},
};
appsFlyer.initSdk(options).then(function(result) {
viewModel.set("initSdkResponse", result.status);
}, function(err) {
viewModel.set("initSdkResponse", JSON.stringify(err));
});
appsFlyer.logEvent(options): Promise<any>
logEvent
method allows you to send in-app events to AppsFlyer analytics. This method allows you to add events dynamically by adding them directly to the application code.parameter | type | description |
---|---|---|
options | Object | log event configuration |
options
parameter | type | description |
---|---|---|
eventName | string | custom event name, is presented in your dashboard. See the Event list HERE |
eventValues | Object | event details (see example bellow) |
Example: (native javascript)
var options = {
eventName: "af_add_to_cart",
eventValues: {
"af_content_id": "id123",
"af_currency": "USD",
"af_revenue": "2"
}
};
appsFlyer.logEvent(options).then(function(result) {
viewModel.set("logEventResponse", result);
}, function(err) {
viewModel.set("logEventResponse", JSON.stringify(err));
});
This plugin has a demo
project bundled with it. To give it a try , clone this repo and from root a.e. nativescript-plugin-appsflyer
execute the following:
npm run setup
npm run demo.ios
or npm run demo.android
will run for the appropriate platform.FAQs
Appsflyer SDK for NativeScript applications
We found that nativescript-plugin-appsflyer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.