cordova-plugin-appsflyer-sdk
Advanced tools
Comparing version 6.14.3 to 6.15.0-rc1
{ | ||
"name": "cordova-plugin-appsflyer-sdk", | ||
"version": "6.14.3", | ||
"version": "6.15.0-rc1", | ||
"description": "Cordova AppsFlyer SDK Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -45,5 +45,13 @@ | ||
- iOS AppsFlyerSDK **v6.14.2** | ||
- iOS AppsFlyerSDK **v6.14.3** | ||
- Android AppsFlyerSDK **v6.14.0** | ||
### <a id="breakingChanges"> ❗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. <br> | ||
following the instructions in [this](https://dev.appsflyer.com/hc/docs/install-android-sdk#huawei-install-referrer) link. <br> | ||
please follow also these Cordova doc guidlines [here](https://cordova.apache.org/docs/en/11.x/guide/platforms/android/#extending-buildgradle). | ||
### <a id="breakingChanges"> ❗v6 Breaking Changes | ||
@@ -50,0 +58,0 @@ |
@@ -6,2 +6,4 @@ var exec = require('cordova/exec'), | ||
let AFAdRevenueData; | ||
if (!window.CustomEvent) { | ||
@@ -41,2 +43,41 @@ window.CustomEvent = function (type, config) { | ||
// AFAdRevenueData object with MediationNetwork enum | ||
global.AFAdRevenueData = (function() { | ||
const MediationNetwork = { | ||
IRONSOURCE:"ironsource", | ||
APPLOVIN_MAX:"applovinmax", | ||
GOOGLE_ADMOB:"googleadmob", | ||
FYBER:"fyber", | ||
APPODEAL:"appodeal", | ||
ADMOST:"Admost", | ||
TOPON:"Topon", | ||
TRADPLUS:"Tradplus", | ||
YANDEX:"Yandex", | ||
CHARTBOOST:"chartboost", | ||
UNITY:"Unity", | ||
TOPON_PTE:"toponpte", | ||
CUSTOM_MEDIATION:"customMediation", | ||
DIRECT_MONETIZATION_NETWORK:"directMonetizationNetwork" | ||
}; | ||
function AFAdRevenueData(monetizationNetwork, mediationNetwork, currencyIso4217Code, revenue) { | ||
if (!Object.values(MediationNetwork).includes(mediationNetwork)) { | ||
throw new Error("Invalid enum value for 'mediationNetwork'."); | ||
} | ||
this.monetizationNetwork = monetizationNetwork; | ||
this.mediationNetwork = mediationNetwork; | ||
this.currencyIso4217Code = currencyIso4217Code; | ||
this.revenue = revenue; | ||
} | ||
return AFAdRevenueData; // Expose the constructor directly | ||
})(); | ||
function validateAFAdRevenueData(afAdRevenueData) { | ||
if (!(afAdRevenueData instanceof AFAdRevenueData)) { | ||
throw new Error("Invalid AFAdRevenueData object."); | ||
} | ||
return afAdRevenueData; | ||
} | ||
/** | ||
@@ -115,2 +156,15 @@ * initialize the SDK. | ||
/** | ||
* Public API - logAdRevenue function | ||
*/ | ||
AppsFlyer.prototype.logAdRevenue = function(afAdRevenueData, additionalParameters) { | ||
argscheck.checkArgs('S', 'AppsFlyer.logAdRevenue', arguments); | ||
// Validate AFAdRevenueData before logging | ||
const validatedAfAdRevenueData = validateAFAdRevenueData(afAdRevenueData); | ||
// Call the 'logAdRevenue' API method with the validated data | ||
exec(null, null, 'AppsFlyerPlugin', 'logAdRevenue', [validatedAfAdRevenueData, additionalParameters]); | ||
}; | ||
/** | ||
* Setting your own Custom ID enables you to cross-reference your own unique ID with AppsFlyer’s user ID and the other devices’ IDs. | ||
@@ -117,0 +171,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
397515
932
184
1