cordova-plugin-appsflyer-sdk
Advanced tools
Comparing version 6.8.2 to 6.10.2
@@ -33,4 +33,4 @@ /* | ||
var options = { | ||
devKey: 'UsXxXxed', | ||
appId: '7XxXx1', | ||
devKey: 'xxx1234567', | ||
appId: 'id111111111', | ||
isDebug: true, | ||
@@ -37,0 +37,0 @@ onInstallConversionDataListener: true, |
{ | ||
"name": "cordova-plugin-appsflyer-sdk", | ||
"version": "6.8.2", | ||
"version": "6.10.2", | ||
"description": "Cordova AppsFlyer SDK Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
/* jshint jasmine: true */ | ||
/* global cordova */ | ||
exports.defineAutoTests = function () { | ||
var platform = window.cordova.platformId; | ||
var isIOS = window.cordova.platformId === 'ios'; | ||
var isAndroid = window.cordova.platformId === 'android'; | ||
var isIOS = cordova.platformId == 'ios'; | ||
var isAndroid = cordova.platformId == 'android'; | ||
var AppsFlyerError = { | ||
INVALID_ARGUMENT_ERROR: "INVALID_ARGUMENT_ERROR", | ||
NO_DEVKEY_FOUND: "AppsFlyer 'devKey' is missing or empty", | ||
DEVKEY_NOT_VALID: "'devKey' is not valid", | ||
APPID_NOT_VALID: "'appId' is not valid", | ||
NO_APPID_FOUND: "'appId' is missing or empty", | ||
SUCCESS: "Success" | ||
}; | ||
var AppsFlyerError = { | ||
INVALID_ARGUMENT_ERROR: "INVALID_ARGUMENT_ERROR", | ||
NO_DEVKEY_FOUND: "No 'devKey' found or its empty", | ||
APPID_NOT_VALID: "'appId' is not valid", | ||
NO_APPID_FOUND: "No 'appId' found or its empty", | ||
SUCCESS: "Success" | ||
}; | ||
var fail = function (done) { | ||
expect(true).toBe(false); | ||
done(); | ||
}; | ||
var fail = function(done) { | ||
expect(true).toBe(false); | ||
done(); | ||
}; | ||
describe("AppsFlyer", function () { | ||
describe("AppsFlyer", function () { | ||
it("appsflyer.spec.1 should exist", function () { | ||
expect(window.plugins.appsFlyer).toBeDefined(); | ||
}); | ||
it("appsflyer.spec.1 should exist", function() { | ||
expect(window.plugins.appsFlyer).toBeDefined(); | ||
}); | ||
it("appsFlyer.initSdk method", function () { | ||
expect(window.plugins.appsFlyer.initSdk).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.initSdk).toBe('function'); | ||
}); | ||
it("appsFlyer.initSdk method", function(){ | ||
expect(window.plugins.appsFlyer.initSdk).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.initSdk).toBe('function'); | ||
}); | ||
it("appsFlyer.registerDeepLink method", function () { | ||
expect(window.plugins.appsFlyer.registerDeepLink).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.registerDeepLink).toBe('function'); | ||
}); | ||
it("appsFlyer.setCurrencyCode method", function(){ | ||
expect(window.plugins.appsFlyer.setCurrencyCode).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setCurrencyCode).toBe('function'); | ||
}); | ||
it("appsFlyer.registerOnAppOpenAttribution method", function () { | ||
expect(window.plugins.appsFlyer.registerOnAppOpenAttribution).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.registerOnAppOpenAttribution).toBe('function'); | ||
}); | ||
it("appsFlyer.setAppUserId method", function(){ | ||
expect(window.plugins.appsFlyer.setAppUserId).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setAppUserId).toBe('function'); | ||
}); | ||
it("appsFlyer.setCurrencyCode method", function () { | ||
expect(window.plugins.appsFlyer.setCurrencyCode).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setCurrencyCode).toBe('function'); | ||
}); | ||
it("appsFlyer.setGCMProjectID method", function(){ | ||
expect(window.plugins.appsFlyer.setGCMProjectID).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setGCMProjectID).toBe('function'); | ||
}); | ||
it("appsFlyer.setAppUserId method", function () { | ||
expect(window.plugins.appsFlyer.setAppUserId).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setAppUserId).toBe('function'); | ||
}); | ||
it("appsFlyer.enableUninstallTracking method", function(){ | ||
expect(window.plugins.appsFlyer.enableUninstallTracking).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.enableUninstallTracking).toBe('function'); | ||
}); | ||
it("appsFlyer.getAppsFlyerUID method", function () { | ||
expect(window.plugins.appsFlyer.getAppsFlyerUID).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.getAppsFlyerUID).toBe('function'); | ||
}); | ||
it("appsFlyer.getAppsFlyerUID method", function(){ | ||
expect(window.plugins.appsFlyer.getAppsFlyerUID).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.getAppsFlyerUID).toBe('function'); | ||
}); | ||
it("appsFlyer.anonymizeUser method", function () { | ||
expect(window.plugins.appsFlyer.anonymizeUser).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.anonymizeUser).toBe('function'); | ||
}); | ||
it("appsFlyer.trackEvent method", function(){ | ||
expect(window.plugins.appsFlyer.trackEvent).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.trackEvent).toBe('function'); | ||
}); | ||
it("appsFlyer.Stop method", function () { | ||
expect(window.plugins.appsFlyer.Stop).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.Stop).toBe('function'); | ||
}); | ||
}); | ||
it("appsFlyer.logEvent method", function () { | ||
expect(window.plugins.appsFlyer.logEvent).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.logEvent).toBe('function'); | ||
}); | ||
it("appsFlyer.updateServerUninstallToken method", function () { | ||
expect(window.plugins.appsFlyer.updateServerUninstallToken).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.updateServerUninstallToken).toBe('function'); | ||
}); | ||
describe("AppsFlyer -> initSdk", function () { | ||
it("appsFlyer.setAppInviteOneLinkID method", function () { | ||
expect(window.plugins.appsFlyer.setAppInviteOneLinkID).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setAppInviteOneLinkID).toBe('function'); | ||
}); | ||
it("appsFlyer.generateInviteLink method", function () { | ||
expect(window.plugins.appsFlyer.generateInviteLink).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.generateInviteLink).toBe('function'); | ||
}); | ||
/* | ||
################## SUCCESS testing ################################ | ||
*/ | ||
it("appsFlyer.logCrossPromotionImpression method", function () { | ||
expect(window.plugins.appsFlyer.logCrossPromotionImpression).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.logCrossPromotionImpression).toBe('function'); | ||
}); | ||
it("appsflyer.spec.2 success callback devKey is defined", function(done) { | ||
it("appsFlyer.logCrossPromotionAndOpenStore method", function () { | ||
expect(window.plugins.appsFlyer.logCrossPromotionAndOpenStore).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.logCrossPromotionAndOpenStore).toBe('function'); | ||
}); | ||
//ios uses appId, this test will fail | ||
if (isIOS) { | ||
pending(); | ||
return; | ||
} | ||
it("appsFlyer.handleOpenUrl method", function () { | ||
expect(window.plugins.appsFlyer.handleOpenUrl).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.handleOpenUrl).toBe('function'); | ||
}); | ||
var successCB = function(result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
return; | ||
}; | ||
it("appsFlyer.registerUninstall method", function () { | ||
expect(window.plugins.appsFlyer.registerUninstall).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.registerUninstall).toBe('function'); | ||
}); | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
it("appsFlyer.getSdkVersion method", function () { | ||
expect(window.plugins.appsFlyer.getSdkVersion).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.getSdkVersion).toBe('function'); | ||
}); | ||
it("appsFlyer.setSharingFilterForPartners method", function () { | ||
expect(window.plugins.appsFlyer.setSharingFilterForPartners).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setSharingFilterForPartners).toBe('function'); | ||
}); | ||
it("appsFlyer.setSharingFilter method", function () { | ||
expect(window.plugins.appsFlyer.setSharingFilter).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setSharingFilter).toBe('function'); | ||
}); | ||
it("appsFlyer.setSharingFilterForAllPartners method", function () { | ||
expect(window.plugins.appsFlyer.setSharingFilterForAllPartners).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setSharingFilterForAllPartners).toBe('function'); | ||
}); | ||
it("appsFlyer.validateAndLogInAppPurchase method", function () { | ||
expect(window.plugins.appsFlyer.validateAndLogInAppPurchase).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.validateAndLogInAppPurchase).toBe('function'); | ||
}); | ||
it("appsFlyer.setUseReceiptValidationSandbox method", function () { | ||
expect(window.plugins.appsFlyer.setUseReceiptValidationSandbox).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setUseReceiptValidationSandbox).toBe('function'); | ||
}); | ||
it("appsFlyer.disableCollectASA method", function () { | ||
expect(window.plugins.appsFlyer.disableCollectASA).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.disableCollectASA).toBe('function'); | ||
}); | ||
it("appsFlyer.setDisableAdvertisingIdentifier method", function () { | ||
expect(window.plugins.appsFlyer.setDisableAdvertisingIdentifier).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setDisableAdvertisingIdentifier).toBe('function'); | ||
}); | ||
it("appsFlyer.setOneLinkCustomDomains method", function () { | ||
expect(window.plugins.appsFlyer.setOneLinkCustomDomains).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setOneLinkCustomDomains).toBe('function'); | ||
}); | ||
it("appsFlyer.enableFacebookDeferredApplinks method", function () { | ||
expect(window.plugins.appsFlyer.enableFacebookDeferredApplinks).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.enableFacebookDeferredApplinks).toBe('function'); | ||
}); | ||
it("appsFlyer.setPhoneNumber method", function () { | ||
expect(window.plugins.appsFlyer.setPhoneNumber).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setPhoneNumber).toBe('function'); | ||
}); | ||
it("appsFlyer.setUserEmails method", function () { | ||
expect(window.plugins.appsFlyer.setUserEmails).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setUserEmails).toBe('function'); | ||
}); | ||
it("appsFlyer.setHost method", function () { | ||
expect(window.plugins.appsFlyer.setHost).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setHost).toBe('function'); | ||
}); | ||
it("appsFlyer.addPushNotificationDeepLinkPath method", function () { | ||
expect(window.plugins.appsFlyer.addPushNotificationDeepLinkPath).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.addPushNotificationDeepLinkPath).toBe('function'); | ||
}); | ||
it("appsFlyer.setResolveDeepLinkURLs method", function () { | ||
expect(window.plugins.appsFlyer.setResolveDeepLinkURLs).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setResolveDeepLinkURLs).toBe('function'); | ||
}); | ||
it("appsFlyer.disableSKAD method", function () { | ||
expect(window.plugins.appsFlyer.disableSKAD).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.disableSKAD).toBe('function'); | ||
}); | ||
it("appsFlyer.setCurrentDeviceLanguage method", function () { | ||
expect(window.plugins.appsFlyer.setCurrentDeviceLanguage).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setCurrentDeviceLanguage).toBe('function'); | ||
}); | ||
it("appsFlyer.setAdditionalData method", function () { | ||
expect(window.plugins.appsFlyer.setAdditionalData).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setAdditionalData).toBe('function'); | ||
}); | ||
it("appsFlyer.setPartnerData method", function () { | ||
expect(window.plugins.appsFlyer.setPartnerData).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setPartnerData).toBe('function'); | ||
}); | ||
it("appsFlyer.sendPushNotificationData method", function () { | ||
expect(window.plugins.appsFlyer.sendPushNotificationData).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.sendPushNotificationData).toBe('function'); | ||
}); | ||
it("appsFlyer.setDisableNetworkData method", function () { | ||
expect(window.plugins.appsFlyer.setDisableNetworkData).toBeDefined(); | ||
expect(typeof window.plugins.appsFlyer.setDisableNetworkData).toBe('function'); | ||
}); | ||
}); | ||
describe("AppsFlyer -> initSdk", function () { | ||
// /* | ||
// ################## SUCCESS testing ################################ | ||
// */ | ||
it("appsflyer.init success callback devKey and app id are defined", function (done) { | ||
var successCB = function (result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
fail(done); | ||
return; | ||
} | ||
} | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: '123456789', | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL' | ||
it("appsflyer.init success callback devKey and AppId and isDebug is defined", function (done) { | ||
var successCB = function (result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
fail(done); | ||
} | ||
it("appsflyer.spec.2 success callback devKey | AppId | isDebug is defined", function(done) { | ||
var successCB = function(result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
return; | ||
}; | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: '123456789', | ||
isDebug: false | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
fail(done); | ||
return; | ||
} | ||
it("appsflyer.init success callback devKey is defined in android", function (done) { | ||
//ios uses appId, this test will fail | ||
if (isIOS) { | ||
pending(); | ||
return; | ||
} | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: '123456789', | ||
isDebug: false | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var successCB = function (result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
return; | ||
}; | ||
it("appsflyer.spec.2 success callback devKey and AppId is defined", function(done) { | ||
var successCB = function(result) { | ||
expect(result).toBeDefined(); | ||
expect(typeof result === "string").toBe(true); | ||
expect(result).toBe(AppsFlyerError.SUCCESS); | ||
done(); | ||
return; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
fail(done); | ||
return; | ||
} | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
fail(done); | ||
return; | ||
} | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: '123456789' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
/* | ||
################## ERROR testing ################################ | ||
*/ | ||
it("appsflyer.init error callback devKey is undefined", function (done) { | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_DEVKEY_FOUND); | ||
done(); | ||
} | ||
var options = { | ||
appId: '123456789' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
/* | ||
################## ERROR testing ################################ | ||
*/ | ||
it("appsflyer.spec.2 error callback devKey is undefined", function(done) { | ||
var successCB = function(result) { | ||
fail(done); | ||
return; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_DEVKEY_FOUND); | ||
done(); | ||
return; | ||
} | ||
it("appsflyer.init error callback devKey is Empty", function (done) { | ||
var options = {}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_DEVKEY_FOUND); | ||
done(); | ||
} | ||
it("appsflyer.spec.2 error callback appId is undefined", function(done) { | ||
var options = { | ||
devKey: '', | ||
appId: '123456789' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
if(isAndroid){ | ||
pending(); | ||
return; | ||
} | ||
var successCB = function(result) { | ||
fail(done); | ||
return; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_APPID_FOUND); | ||
done(); | ||
return; | ||
} | ||
it("appsflyer.init error callback devkey defined as Integer", function (done) { | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.DEVKEY_NOT_VALID); | ||
done(); | ||
} | ||
it("appsflyer.spec.2 error callback appId defined as Integer", function(done) { | ||
var options = { | ||
devKey: 123456123, | ||
appId: '123456789' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
if(isAndroid){ | ||
pending(); | ||
return; | ||
} | ||
var successCB = function(result) { | ||
fail(done); | ||
return; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.APPID_NOT_VALID); | ||
done(); | ||
return; | ||
} | ||
it("appsflyer.init error callback appId is undefined", function (done) { | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: 123456789 | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
if (isAndroid) { | ||
done(); | ||
return; | ||
} | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
it("appsflyer.spec.2 error callback devKey is Empty", function(done) { | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_APPID_FOUND); | ||
done(); | ||
} | ||
var successCB = function(result) { | ||
fail(done); | ||
return; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_DEVKEY_FOUND); | ||
done(); | ||
return; | ||
} | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
var options = { | ||
devKey: '', | ||
appId: '123456789' | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
}); | ||
it("appsflyer.init error callback appId defined as Integer", function (done) { | ||
if (isAndroid) { | ||
done(); | ||
return; | ||
} | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.APPID_NOT_VALID); | ||
done(); | ||
} | ||
var options = { | ||
devKey: 'd3Ac9qPnrpXYZxfWmCdpwL', | ||
appId: 123456789 | ||
}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
it("appsflyer.init error callback appId and devkey are not defined iOS", function (done) { | ||
if (isAndroid) { | ||
done(); | ||
return; | ||
} | ||
var successCB = function (result) { | ||
fail(done); | ||
}; | ||
function errorCB(err) { | ||
expect(err).toBeDefined(); | ||
expect(typeof err === "string").toBe(true); | ||
expect(err).toBe(AppsFlyerError.NO_DEVKEY_FOUND); | ||
done(); | ||
} | ||
exports.defineManualTests = function (contentEl, createActionButton) {}; | ||
var options = {}; | ||
window.plugins.appsFlyer.initSdk(options, successCB, errorCB); | ||
}); | ||
}); | ||
}; | ||
exports.defineManualTests = function (contentEl, createActionButton) { | ||
}; |
@@ -31,3 +31,3 @@ var exec = require('cordova/exec'), | ||
} else { | ||
if (args.appId !== undefined && typeof args.appId != 'string') { | ||
if (args.appId !== undefined && (typeof args.appId != 'string' || args.appId === "")) { | ||
if (errorCB) { | ||
@@ -40,2 +40,6 @@ errorCB(AppsFlyerError.APPID_NOT_VALID); | ||
} | ||
} else if (args.devKey === undefined || args.devKey === "") { | ||
if (errorCB) { | ||
errorCB(AppsFlyerError.NO_DEVKEY_FOUND); | ||
} | ||
} else { | ||
@@ -42,0 +46,0 @@ exec(successCB, errorCB, 'AppsFlyerPlugin', 'initSdk', [args]); |
@@ -5,3 +5,3 @@ | ||
INVALID_ARGUMENT_ERROR: "INVALID ARGUMENT ERROR", | ||
NO_DEVKEY_FOUND: "No 'devKey' found or is empty", | ||
NO_DEVKEY_FOUND: "AppsFlyer 'devKey' is missing or empty", | ||
APPID_NOT_VALID: "'appId' is not valid", | ||
@@ -8,0 +8,0 @@ DEVKEY_NOT_VALID: "'devKey' is not valid", |
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
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
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
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
6887901
187
2525