appsflyer-capacitor-plugin 6.15.1 → 6.15.2-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +74 -35
- package/android/src/main/java/capacitor/plugin/appsflyer/sdk/AppsFlyerPlugin.kt +6 -1
- package/dist/esm/Appsflyer_constants.d.ts +10 -10
- package/dist/esm/Appsflyer_constants.js +10 -10
- package/dist/esm/Appsflyer_constants.js.map +1 -1
- package/dist/plugin.cjs.js +10 -10
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +10 -10
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/AppsFlyerPlugin.swift +12 -12
- package/package.json +2 -2
- package/src/Appsflyer_constants.ts +10 -10
package/android/build.gradle
CHANGED
|
@@ -7,10 +7,40 @@ import java.nio.file.SimpleFileVisitor
|
|
|
7
7
|
import java.nio.file.attribute.BasicFileAttributes
|
|
8
8
|
|
|
9
9
|
String getPackageJsonPath() {
|
|
10
|
-
|
|
10
|
+
// If APPSFLYER_PACKAGE_JSON_PATH property is set by the developer, use it.
|
|
11
|
+
String envPath = findProperty("APPSFLYER_PACKAGE_JSON_PATH") as String
|
|
12
|
+
if (envPath) {
|
|
13
|
+
logger.lifecycle("package.json path from APPSFLYER_PACKAGE_JSON_PATH: $envPath")
|
|
14
|
+
return envPath
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Potential relative paths to the package.json.
|
|
18
|
+
def possiblePackageJsonPaths = [
|
|
19
|
+
"${projectDir.parentFile}/package.json",
|
|
20
|
+
"${buildDir.parentFile.parentFile}/package.json",
|
|
21
|
+
"${rootDir.parentFile}/node_modules/appsflyer-capacitor-plugin/package.json",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
// Loop through the possible paths and find the first one that exists
|
|
25
|
+
for (possiblePath in possiblePackageJsonPaths) {
|
|
26
|
+
File possibleFile = file(possiblePath)
|
|
27
|
+
if (possibleFile.exists()) {
|
|
28
|
+
logger.lifecycle("Found package.json at: ${possibleFile.absolutePath}")
|
|
29
|
+
return possibleFile.absolutePath
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
logger.lifecycle("Did not locate package.json in any of possiblePackageJsonPaths and APPSFLYER_PACKAGE_JSON_PATH is not specified.")
|
|
34
|
+
return null
|
|
11
35
|
}
|
|
12
36
|
|
|
13
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Finds the node_modules directory by traversing up the directory hierarchy starting from the given directory.
|
|
39
|
+
*
|
|
40
|
+
* @param currentDir The directory from which to start the search.
|
|
41
|
+
* @return The discovered node_modules directory, or null if not found.
|
|
42
|
+
*/
|
|
43
|
+
static def findNodeModulesDir(File currentDir) {
|
|
14
44
|
def dir = currentDir
|
|
15
45
|
while (dir != null) {
|
|
16
46
|
def nodeModulesDir = new File(dir, 'node_modules')
|
|
@@ -22,10 +52,20 @@ def findNodeModulesDir(File currentDir) {
|
|
|
22
52
|
return null
|
|
23
53
|
}
|
|
24
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Searches for a package.json file corresponding to the given package name within the node_modules directory.
|
|
57
|
+
*
|
|
58
|
+
* The search begins from the root project directory and recursively checks each node_modules folder found
|
|
59
|
+
* in parent directories up until the root of the file system hierarchy.
|
|
60
|
+
*
|
|
61
|
+
* @param packageName The name of the package for which to find package.json.
|
|
62
|
+
* @return The contents of the package.json as a Map, or null if not found.
|
|
63
|
+
*/
|
|
25
64
|
def findPackageJsonInDep(String packageName) {
|
|
65
|
+
// Start the search from the root project directory
|
|
26
66
|
def nodeModulesDir = findNodeModulesDir(project.rootDir)
|
|
27
67
|
if (nodeModulesDir == null) {
|
|
28
|
-
|
|
68
|
+
logger.lifecycle("node_modules directory not found in any parent directories.")
|
|
29
69
|
return null
|
|
30
70
|
}
|
|
31
71
|
|
|
@@ -34,68 +74,67 @@ def findPackageJsonInDep(String packageName) {
|
|
|
34
74
|
def walker = new SimpleFileVisitor<Path>() {
|
|
35
75
|
@Override
|
|
36
76
|
FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
|
|
77
|
+
// Looking specifically for the package.json of the target package
|
|
37
78
|
if (file.toAbsolutePath().endsWith("appsflyer-capacitor-plugin/package.json")) {
|
|
38
79
|
try {
|
|
39
80
|
def content = new JsonSlurper().parseText(file.toFile().text)
|
|
40
81
|
if (content.name == packageName) {
|
|
41
|
-
|
|
82
|
+
logger.lifecycle("Found package.json at: ${file.toAbsolutePath()}")
|
|
42
83
|
json = content
|
|
43
84
|
return FileVisitResult.TERMINATE
|
|
44
85
|
}
|
|
45
86
|
} catch (Exception e) {
|
|
46
|
-
|
|
87
|
+
logger.lifecycle("Error parsing JSON in file: ${file.toAbsolutePath().toString()}\n${e.message}\n\t")
|
|
47
88
|
}
|
|
48
89
|
}
|
|
49
90
|
return FileVisitResult.CONTINUE
|
|
50
91
|
}
|
|
51
92
|
}
|
|
93
|
+
// Recursively walk through the file system starting from the node_modules directory
|
|
52
94
|
while (json == null && nodeModulesDir != null) {
|
|
53
95
|
Files.walkFileTree(nodeModulesDir.toPath(), walker)
|
|
54
|
-
//
|
|
55
|
-
// and find another node_modules
|
|
96
|
+
// Search for another node_modules directory two levels up
|
|
56
97
|
nodeModulesDir = findNodeModulesDir(nodeModulesDir.parentFile.parentFile)
|
|
57
98
|
}
|
|
58
99
|
return json
|
|
59
100
|
}
|
|
60
101
|
|
|
61
102
|
def getPackageJson() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
103
|
+
// Use the safe navigation operator when working with possible null values
|
|
104
|
+
String packageJsonPath = getPackageJsonPath()
|
|
105
|
+
File inputFile = packageJsonPath ? new File(packageJsonPath) : null
|
|
106
|
+
|
|
107
|
+
// Attempt to load the package.json if the path is found and the file exists
|
|
108
|
+
if (inputFile?.exists()) {
|
|
109
|
+
try {
|
|
110
|
+
return new JsonSlurper().parseText(inputFile.getText('UTF-8'))
|
|
111
|
+
} catch (Exception e) {
|
|
112
|
+
logger.error("Failed to parse package.json at: ${inputFile.absolutePath}", e)
|
|
113
|
+
}
|
|
67
114
|
} else {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
115
|
+
// package.json not found; search recursively
|
|
116
|
+
logger.lifecycle("Searching for package.json recursively in node_modules directories...")
|
|
117
|
+
def foundJson = findPackageJsonInDep("appsflyer-capacitor-plugin")
|
|
118
|
+
if (foundJson) {
|
|
119
|
+
return foundJson
|
|
120
|
+
}
|
|
71
121
|
}
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def getVersionFromNpm() {
|
|
76
|
-
// Return the version, you can get any value this way
|
|
77
|
-
return getPackageJson()["version"]
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// Create an easy to use function
|
|
81
|
-
def getSDKVersionFromNpm() {
|
|
82
|
-
// Return the version, you can get any value this way
|
|
83
|
-
return getPackageJson()["androidSdkVersion"]
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
def getPluginBuildVersionFromNpm() {
|
|
87
|
-
// Return the version, you can get any value this way
|
|
88
|
-
return getPackageJson()["buildNumber"]
|
|
122
|
+
// If we got here the package.json was not loaded, log an error and return null
|
|
123
|
+
logger.error("The plugin package.json could not be loaded properly; appsflyer-capacitor-plugin may not function as expected.")
|
|
124
|
+
return null
|
|
89
125
|
}
|
|
90
126
|
|
|
91
127
|
ext {
|
|
128
|
+
// Initialize only once and reuse it for all subsequent calls
|
|
129
|
+
packageJson = getPackageJson()
|
|
130
|
+
|
|
92
131
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
93
132
|
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
|
|
94
133
|
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
|
|
95
134
|
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
|
|
96
|
-
af_sdk_version =
|
|
97
|
-
plugin_version =
|
|
98
|
-
plugin_build_version =
|
|
135
|
+
af_sdk_version = packageJson?.androidSdkVersion
|
|
136
|
+
plugin_version = packageJson?.version
|
|
137
|
+
plugin_build_version = packageJson?.buildNumber
|
|
99
138
|
}
|
|
100
139
|
|
|
101
140
|
buildscript {
|
|
@@ -576,7 +576,12 @@ class AppsFlyerPlugin : Plugin() {
|
|
|
576
576
|
|
|
577
577
|
// Convert the mediationNetwork string to the MediationNetwork enum
|
|
578
578
|
val mediationNetworkValue = adRevenueDataJson.getString(AF_MEDIATION_NETWORK) ?: return call.reject("mediationNetwork is missing")
|
|
579
|
-
val mediationNetwork
|
|
579
|
+
val mediationNetwork: MediationNetwork
|
|
580
|
+
try {
|
|
581
|
+
mediationNetwork = MediationNetwork.valueOf(mediationNetworkValue.uppercase())
|
|
582
|
+
} catch (e: IllegalArgumentException) {
|
|
583
|
+
return call.reject("Invalid mediation network")
|
|
584
|
+
}
|
|
580
585
|
|
|
581
586
|
// Create the AFAdRevenueData object
|
|
582
587
|
val adRevenueData = AFAdRevenueData(
|
|
@@ -9,17 +9,17 @@ export declare enum AFConstants {
|
|
|
9
9
|
}
|
|
10
10
|
export declare enum MediationNetwork {
|
|
11
11
|
IRONSOURCE = "ironsource",
|
|
12
|
-
APPLOVIN_MAX = "
|
|
13
|
-
GOOGLE_ADMOB = "
|
|
12
|
+
APPLOVIN_MAX = "applovin_max",
|
|
13
|
+
GOOGLE_ADMOB = "google_admob",
|
|
14
14
|
FYBER = "fyber",
|
|
15
15
|
APPODEAL = "appodeal",
|
|
16
|
-
ADMOST = "
|
|
17
|
-
TOPON = "
|
|
18
|
-
TRADPLUS = "
|
|
19
|
-
YANDEX = "
|
|
16
|
+
ADMOST = "admost",
|
|
17
|
+
TOPON = "topon",
|
|
18
|
+
TRADPLUS = "tradplus",
|
|
19
|
+
YANDEX = "yandex",
|
|
20
20
|
CHARTBOOST = "chartboost",
|
|
21
|
-
UNITY = "
|
|
22
|
-
TOPON_PTE = "
|
|
23
|
-
CUSTOM_MEDIATION = "
|
|
24
|
-
DIRECT_MONETIZATION_NETWORK = "
|
|
21
|
+
UNITY = "unity",
|
|
22
|
+
TOPON_PTE = "topon_pte",
|
|
23
|
+
CUSTOM_MEDIATION = "custom_mediation",
|
|
24
|
+
DIRECT_MONETIZATION_NETWORK = "direct_monetization_network"
|
|
25
25
|
}
|
|
@@ -11,18 +11,18 @@ export var AFConstants;
|
|
|
11
11
|
export var MediationNetwork;
|
|
12
12
|
(function (MediationNetwork) {
|
|
13
13
|
MediationNetwork["IRONSOURCE"] = "ironsource";
|
|
14
|
-
MediationNetwork["APPLOVIN_MAX"] = "
|
|
15
|
-
MediationNetwork["GOOGLE_ADMOB"] = "
|
|
14
|
+
MediationNetwork["APPLOVIN_MAX"] = "applovin_max";
|
|
15
|
+
MediationNetwork["GOOGLE_ADMOB"] = "google_admob";
|
|
16
16
|
MediationNetwork["FYBER"] = "fyber";
|
|
17
17
|
MediationNetwork["APPODEAL"] = "appodeal";
|
|
18
|
-
MediationNetwork["ADMOST"] = "
|
|
19
|
-
MediationNetwork["TOPON"] = "
|
|
20
|
-
MediationNetwork["TRADPLUS"] = "
|
|
21
|
-
MediationNetwork["YANDEX"] = "
|
|
18
|
+
MediationNetwork["ADMOST"] = "admost";
|
|
19
|
+
MediationNetwork["TOPON"] = "topon";
|
|
20
|
+
MediationNetwork["TRADPLUS"] = "tradplus";
|
|
21
|
+
MediationNetwork["YANDEX"] = "yandex";
|
|
22
22
|
MediationNetwork["CHARTBOOST"] = "chartboost";
|
|
23
|
-
MediationNetwork["UNITY"] = "
|
|
24
|
-
MediationNetwork["TOPON_PTE"] = "
|
|
25
|
-
MediationNetwork["CUSTOM_MEDIATION"] = "
|
|
26
|
-
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "
|
|
23
|
+
MediationNetwork["UNITY"] = "unity";
|
|
24
|
+
MediationNetwork["TOPON_PTE"] = "topon_pte";
|
|
25
|
+
MediationNetwork["CUSTOM_MEDIATION"] = "custom_mediation";
|
|
26
|
+
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "direct_monetization_network";
|
|
27
27
|
})(MediationNetwork || (MediationNetwork = {}));
|
|
28
28
|
//# sourceMappingURL=Appsflyer_constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Appsflyer_constants.js","sourceRoot":"","sources":["../../src/Appsflyer_constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACnB,kEAAmD,CAAA;IACnD,4DAA6C,CAAA;IAC7C,4DAA6C,CAAA;IAC7C,4DAA6C,CAAA;IAC7C,0DAA2C,CAAA;IAC3C,8CAA+B,CAAA;IAC/B,4CAA6B,CAAA;AACjC,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;AAGD,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IACxB,6CAAyB,CAAA;IACzB,
|
|
1
|
+
{"version":3,"file":"Appsflyer_constants.js","sourceRoot":"","sources":["../../src/Appsflyer_constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACnB,kEAAmD,CAAA;IACnD,4DAA6C,CAAA;IAC7C,4DAA6C,CAAA;IAC7C,4DAA6C,CAAA;IAC7C,0DAA2C,CAAA;IAC3C,8CAA+B,CAAA;IAC/B,4CAA6B,CAAA;AACjC,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;AAGD,MAAM,CAAN,IAAY,gBAeX;AAfD,WAAY,gBAAgB;IACxB,6CAAyB,CAAA;IACzB,iDAA6B,CAAA;IAC7B,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;IACf,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;IACf,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,6CAAyB,CAAA;IACzB,mCAAe,CAAA;IACf,2CAAuB,CAAA;IACvB,yDAAqC,CAAA;IACrC,+EAA2D,CAAA;AAC/D,CAAC,EAfW,gBAAgB,KAAhB,gBAAgB,QAe3B"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -17,19 +17,19 @@ exports.AFConstants = void 0;
|
|
|
17
17
|
exports.MediationNetwork = void 0;
|
|
18
18
|
(function (MediationNetwork) {
|
|
19
19
|
MediationNetwork["IRONSOURCE"] = "ironsource";
|
|
20
|
-
MediationNetwork["APPLOVIN_MAX"] = "
|
|
21
|
-
MediationNetwork["GOOGLE_ADMOB"] = "
|
|
20
|
+
MediationNetwork["APPLOVIN_MAX"] = "applovin_max";
|
|
21
|
+
MediationNetwork["GOOGLE_ADMOB"] = "google_admob";
|
|
22
22
|
MediationNetwork["FYBER"] = "fyber";
|
|
23
23
|
MediationNetwork["APPODEAL"] = "appodeal";
|
|
24
|
-
MediationNetwork["ADMOST"] = "
|
|
25
|
-
MediationNetwork["TOPON"] = "
|
|
26
|
-
MediationNetwork["TRADPLUS"] = "
|
|
27
|
-
MediationNetwork["YANDEX"] = "
|
|
24
|
+
MediationNetwork["ADMOST"] = "admost";
|
|
25
|
+
MediationNetwork["TOPON"] = "topon";
|
|
26
|
+
MediationNetwork["TRADPLUS"] = "tradplus";
|
|
27
|
+
MediationNetwork["YANDEX"] = "yandex";
|
|
28
28
|
MediationNetwork["CHARTBOOST"] = "chartboost";
|
|
29
|
-
MediationNetwork["UNITY"] = "
|
|
30
|
-
MediationNetwork["TOPON_PTE"] = "
|
|
31
|
-
MediationNetwork["CUSTOM_MEDIATION"] = "
|
|
32
|
-
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "
|
|
29
|
+
MediationNetwork["UNITY"] = "unity";
|
|
30
|
+
MediationNetwork["TOPON_PTE"] = "topon_pte";
|
|
31
|
+
MediationNetwork["CUSTOM_MEDIATION"] = "custom_mediation";
|
|
32
|
+
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "direct_monetization_network";
|
|
33
33
|
})(exports.MediationNetwork || (exports.MediationNetwork = {}));
|
|
34
34
|
|
|
35
35
|
class AppsFlyerConsentClass {
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/Appsflyer_constants.js","esm/appsflyer_interfaces.js","esm/index.js"],"sourcesContent":["export var AFConstants;\n(function (AFConstants) {\n AFConstants[\"onConversionDataSuccess\"] = \"onConversionDataSuccess\";\n AFConstants[\"onConversionDataFail\"] = \"onConversionDataFail\";\n AFConstants[\"onAppOpenAttribution\"] = \"onAppOpenAttribution\";\n AFConstants[\"onAttributionFailure\"] = \"onAttributionFailure\";\n AFConstants[\"CONVERSION_CALLBACK\"] = \"conversion_callback\";\n AFConstants[\"OAOA_CALLBACK\"] = \"oaoa_callback\";\n AFConstants[\"UDL_CALLBACK\"] = \"udl_callback\";\n})(AFConstants || (AFConstants = {}));\nexport var MediationNetwork;\n(function (MediationNetwork) {\n MediationNetwork[\"IRONSOURCE\"] = \"ironsource\";\n MediationNetwork[\"APPLOVIN_MAX\"] = \"
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/Appsflyer_constants.js","esm/appsflyer_interfaces.js","esm/index.js"],"sourcesContent":["export var AFConstants;\n(function (AFConstants) {\n AFConstants[\"onConversionDataSuccess\"] = \"onConversionDataSuccess\";\n AFConstants[\"onConversionDataFail\"] = \"onConversionDataFail\";\n AFConstants[\"onAppOpenAttribution\"] = \"onAppOpenAttribution\";\n AFConstants[\"onAttributionFailure\"] = \"onAttributionFailure\";\n AFConstants[\"CONVERSION_CALLBACK\"] = \"conversion_callback\";\n AFConstants[\"OAOA_CALLBACK\"] = \"oaoa_callback\";\n AFConstants[\"UDL_CALLBACK\"] = \"udl_callback\";\n})(AFConstants || (AFConstants = {}));\nexport var MediationNetwork;\n(function (MediationNetwork) {\n MediationNetwork[\"IRONSOURCE\"] = \"ironsource\";\n MediationNetwork[\"APPLOVIN_MAX\"] = \"applovin_max\";\n MediationNetwork[\"GOOGLE_ADMOB\"] = \"google_admob\";\n MediationNetwork[\"FYBER\"] = \"fyber\";\n MediationNetwork[\"APPODEAL\"] = \"appodeal\";\n MediationNetwork[\"ADMOST\"] = \"admost\";\n MediationNetwork[\"TOPON\"] = \"topon\";\n MediationNetwork[\"TRADPLUS\"] = \"tradplus\";\n MediationNetwork[\"YANDEX\"] = \"yandex\";\n MediationNetwork[\"CHARTBOOST\"] = \"chartboost\";\n MediationNetwork[\"UNITY\"] = \"unity\";\n MediationNetwork[\"TOPON_PTE\"] = \"topon_pte\";\n MediationNetwork[\"CUSTOM_MEDIATION\"] = \"custom_mediation\";\n MediationNetwork[\"DIRECT_MONETIZATION_NETWORK\"] = \"direct_monetization_network\";\n})(MediationNetwork || (MediationNetwork = {}));\n//# sourceMappingURL=Appsflyer_constants.js.map","class AppsFlyerConsentClass {\n constructor(isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization) {\n this.isUserSubjectToGDPR = isUserSubjectToGDPR;\n this.hasConsentForDataUsage = hasConsentForDataUsage;\n this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;\n }\n static forGDPRUser(hasConsentForDataUsage, hasConsentForAdsPersonalization) {\n return new AppsFlyerConsentClass(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);\n }\n static forNonGDPRUser() {\n return new AppsFlyerConsentClass(false);\n }\n}\nexport const AppsFlyerConsent = {\n forGDPRUser: AppsFlyerConsentClass.forGDPRUser,\n forNonGDPRUser: AppsFlyerConsentClass.forNonGDPRUser\n};\n//# sourceMappingURL=appsflyer_interfaces.js.map","import { registerPlugin } from '@capacitor/core';\nconst AppsFlyer = registerPlugin('AppsFlyerPlugin', {});\nexport * from './definitions';\nexport * from './Appsflyer_constants';\nexport * from './appsflyer_interfaces';\nexport { AppsFlyer };\n//# sourceMappingURL=index.js.map"],"names":["AFConstants","MediationNetwork","registerP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I,gBAAgB,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC;AAChD,IAAI,gBAAgB,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,CAAC;AAC9D,IAAI,gBAAgB,CAAC,6BAA6B,CAAC,GAAG,6BAA6B,CAAC;AACpF,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;;AC1B/C,MAAM,qBAAqB,CAAC;AAC5B,IAAI,WAAW,CAAC,mBAAmB,EAAE,sBAAsB,EAAE,+BAA+B,EAAE;AAC9F,QAAQ,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AACvD,QAAQ,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AAC7D,QAAQ,IAAI,CAAC,+BAA+B,GAAG,+BAA+B,CAAC;AAC/E,KAAK;AACL,IAAI,OAAO,WAAW,CAAC,sBAAsB,EAAE,+BAA+B,EAAE;AAChF,QAAQ,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,sBAAsB,EAAE,+BAA+B,CAAC,CAAC;AACxG,KAAK;AACL,IAAI,OAAO,cAAc,GAAG;AAC5B,QAAQ,OAAO,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC;AAChD,KAAK;AACL,CAAC;AACW,MAAC,gBAAgB,GAAG;AAChC,IAAI,WAAW,EAAE,qBAAqB,CAAC,WAAW;AAClD,IAAI,cAAc,EAAE,qBAAqB,CAAC,cAAc;AACxD;;ACfK,MAAC,SAAS,GAAGC,mBAAc,CAAC,iBAAiB,EAAE,EAAE;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -14,19 +14,19 @@ var AppsFlyerCapacitorPlugin = (function (exports, core) {
|
|
|
14
14
|
exports.MediationNetwork = void 0;
|
|
15
15
|
(function (MediationNetwork) {
|
|
16
16
|
MediationNetwork["IRONSOURCE"] = "ironsource";
|
|
17
|
-
MediationNetwork["APPLOVIN_MAX"] = "
|
|
18
|
-
MediationNetwork["GOOGLE_ADMOB"] = "
|
|
17
|
+
MediationNetwork["APPLOVIN_MAX"] = "applovin_max";
|
|
18
|
+
MediationNetwork["GOOGLE_ADMOB"] = "google_admob";
|
|
19
19
|
MediationNetwork["FYBER"] = "fyber";
|
|
20
20
|
MediationNetwork["APPODEAL"] = "appodeal";
|
|
21
|
-
MediationNetwork["ADMOST"] = "
|
|
22
|
-
MediationNetwork["TOPON"] = "
|
|
23
|
-
MediationNetwork["TRADPLUS"] = "
|
|
24
|
-
MediationNetwork["YANDEX"] = "
|
|
21
|
+
MediationNetwork["ADMOST"] = "admost";
|
|
22
|
+
MediationNetwork["TOPON"] = "topon";
|
|
23
|
+
MediationNetwork["TRADPLUS"] = "tradplus";
|
|
24
|
+
MediationNetwork["YANDEX"] = "yandex";
|
|
25
25
|
MediationNetwork["CHARTBOOST"] = "chartboost";
|
|
26
|
-
MediationNetwork["UNITY"] = "
|
|
27
|
-
MediationNetwork["TOPON_PTE"] = "
|
|
28
|
-
MediationNetwork["CUSTOM_MEDIATION"] = "
|
|
29
|
-
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "
|
|
26
|
+
MediationNetwork["UNITY"] = "unity";
|
|
27
|
+
MediationNetwork["TOPON_PTE"] = "topon_pte";
|
|
28
|
+
MediationNetwork["CUSTOM_MEDIATION"] = "custom_mediation";
|
|
29
|
+
MediationNetwork["DIRECT_MONETIZATION_NETWORK"] = "direct_monetization_network";
|
|
30
30
|
})(exports.MediationNetwork || (exports.MediationNetwork = {}));
|
|
31
31
|
|
|
32
32
|
class AppsFlyerConsentClass {
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/Appsflyer_constants.js","esm/appsflyer_interfaces.js","esm/index.js"],"sourcesContent":["export var AFConstants;\n(function (AFConstants) {\n AFConstants[\"onConversionDataSuccess\"] = \"onConversionDataSuccess\";\n AFConstants[\"onConversionDataFail\"] = \"onConversionDataFail\";\n AFConstants[\"onAppOpenAttribution\"] = \"onAppOpenAttribution\";\n AFConstants[\"onAttributionFailure\"] = \"onAttributionFailure\";\n AFConstants[\"CONVERSION_CALLBACK\"] = \"conversion_callback\";\n AFConstants[\"OAOA_CALLBACK\"] = \"oaoa_callback\";\n AFConstants[\"UDL_CALLBACK\"] = \"udl_callback\";\n})(AFConstants || (AFConstants = {}));\nexport var MediationNetwork;\n(function (MediationNetwork) {\n MediationNetwork[\"IRONSOURCE\"] = \"ironsource\";\n MediationNetwork[\"APPLOVIN_MAX\"] = \"
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/Appsflyer_constants.js","esm/appsflyer_interfaces.js","esm/index.js"],"sourcesContent":["export var AFConstants;\n(function (AFConstants) {\n AFConstants[\"onConversionDataSuccess\"] = \"onConversionDataSuccess\";\n AFConstants[\"onConversionDataFail\"] = \"onConversionDataFail\";\n AFConstants[\"onAppOpenAttribution\"] = \"onAppOpenAttribution\";\n AFConstants[\"onAttributionFailure\"] = \"onAttributionFailure\";\n AFConstants[\"CONVERSION_CALLBACK\"] = \"conversion_callback\";\n AFConstants[\"OAOA_CALLBACK\"] = \"oaoa_callback\";\n AFConstants[\"UDL_CALLBACK\"] = \"udl_callback\";\n})(AFConstants || (AFConstants = {}));\nexport var MediationNetwork;\n(function (MediationNetwork) {\n MediationNetwork[\"IRONSOURCE\"] = \"ironsource\";\n MediationNetwork[\"APPLOVIN_MAX\"] = \"applovin_max\";\n MediationNetwork[\"GOOGLE_ADMOB\"] = \"google_admob\";\n MediationNetwork[\"FYBER\"] = \"fyber\";\n MediationNetwork[\"APPODEAL\"] = \"appodeal\";\n MediationNetwork[\"ADMOST\"] = \"admost\";\n MediationNetwork[\"TOPON\"] = \"topon\";\n MediationNetwork[\"TRADPLUS\"] = \"tradplus\";\n MediationNetwork[\"YANDEX\"] = \"yandex\";\n MediationNetwork[\"CHARTBOOST\"] = \"chartboost\";\n MediationNetwork[\"UNITY\"] = \"unity\";\n MediationNetwork[\"TOPON_PTE\"] = \"topon_pte\";\n MediationNetwork[\"CUSTOM_MEDIATION\"] = \"custom_mediation\";\n MediationNetwork[\"DIRECT_MONETIZATION_NETWORK\"] = \"direct_monetization_network\";\n})(MediationNetwork || (MediationNetwork = {}));\n//# sourceMappingURL=Appsflyer_constants.js.map","class AppsFlyerConsentClass {\n constructor(isUserSubjectToGDPR, hasConsentForDataUsage, hasConsentForAdsPersonalization) {\n this.isUserSubjectToGDPR = isUserSubjectToGDPR;\n this.hasConsentForDataUsage = hasConsentForDataUsage;\n this.hasConsentForAdsPersonalization = hasConsentForAdsPersonalization;\n }\n static forGDPRUser(hasConsentForDataUsage, hasConsentForAdsPersonalization) {\n return new AppsFlyerConsentClass(true, hasConsentForDataUsage, hasConsentForAdsPersonalization);\n }\n static forNonGDPRUser() {\n return new AppsFlyerConsentClass(false);\n }\n}\nexport const AppsFlyerConsent = {\n forGDPRUser: AppsFlyerConsentClass.forGDPRUser,\n forNonGDPRUser: AppsFlyerConsentClass.forNonGDPRUser\n};\n//# sourceMappingURL=appsflyer_interfaces.js.map","import { registerPlugin } from '@capacitor/core';\nconst AppsFlyer = registerPlugin('AppsFlyerPlugin', {});\nexport * from './definitions';\nexport * from './Appsflyer_constants';\nexport * from './appsflyer_interfaces';\nexport { AppsFlyer };\n//# sourceMappingURL=index.js.map"],"names":["AFConstants","MediationNetwork","registerPlugin"],"mappings":";;;AAAWA,iCAAY;IACvB,CAAC,UAAU,WAAW,EAAE;IACxB,IAAI,WAAW,CAAC,yBAAyB,CAAC,GAAG,yBAAyB,CAAC;IACvE,IAAI,WAAW,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IACjE,IAAI,WAAW,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IACjE,IAAI,WAAW,CAAC,sBAAsB,CAAC,GAAG,sBAAsB,CAAC;IACjE,IAAI,WAAW,CAAC,qBAAqB,CAAC,GAAG,qBAAqB,CAAC;IAC/D,IAAI,WAAW,CAAC,eAAe,CAAC,GAAG,eAAe,C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I,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;IAC7D,QAAQ,IAAI,CAAC,+BAA+B,GAAG,+BAA+B,CAAC;IAC/E,KAAK;IACL,IAAI,OAAO,WAAW,CAAC,sBAAsB,EAAE,+BAA+B,EAAE;IAChF,QAAQ,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,sBAAsB,EAAE,+BAA+B,CAAC,CAAC;IACxG,KAAK;IACL,IAAI,OAAO,cAAc,GAAG;IAC5B,QAAQ,OAAO,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAChD,KAAK;IACL,CAAC;AACW,UAAC,gBAAgB,GAAG;IAChC,IAAI,WAAW,EAAE,qBAAqB,CAAC,WAAW;IAClD,IAAI,cAAc,EAAE,qBAAqB,CAAC,cAAc;IACxD;;ACfK,UAAC,SAAS,GAAGC,mBAAc,CAAC,iBAAiB,EAAE,EAAE;;;;;;;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import AppsFlyerLib
|
|
|
5
5
|
|
|
6
6
|
@objc(AppsFlyerPlugin)
|
|
7
7
|
public class AppsFlyerPlugin: CAPPlugin {
|
|
8
|
-
private let APPSFLYER_PLUGIN_VERSION = "6.15.
|
|
8
|
+
private let APPSFLYER_PLUGIN_VERSION = "6.15.2-rc2"
|
|
9
9
|
private var conversion = true
|
|
10
10
|
private var oaoa = true
|
|
11
11
|
private var udl = false
|
|
@@ -167,33 +167,33 @@ public class AppsFlyerPlugin: CAPPlugin {
|
|
|
167
167
|
// Helper function to map mediation network string to the AppsFlyer enum
|
|
168
168
|
private func MediationNetworkType(rawValue: String) -> MediationNetworkType? {
|
|
169
169
|
switch rawValue {
|
|
170
|
-
case "
|
|
170
|
+
case "google_admob":
|
|
171
171
|
return .googleAdMob
|
|
172
172
|
case "fyber":
|
|
173
173
|
return .fyber
|
|
174
174
|
case "ironsource":
|
|
175
175
|
return .ironSource
|
|
176
|
-
case "
|
|
176
|
+
case "applovin_max":
|
|
177
177
|
return .applovinMax
|
|
178
178
|
case "appodeal":
|
|
179
179
|
return .appodeal
|
|
180
|
-
case "
|
|
180
|
+
case "admost":
|
|
181
181
|
return .admost
|
|
182
|
-
case "
|
|
182
|
+
case "topon":
|
|
183
183
|
return .topon
|
|
184
|
-
case "
|
|
184
|
+
case "tradplus":
|
|
185
185
|
return .tradplus
|
|
186
|
-
case "
|
|
186
|
+
case "yandex":
|
|
187
187
|
return .yandex
|
|
188
188
|
case "chartboost":
|
|
189
189
|
return .chartBoost
|
|
190
|
-
case "
|
|
190
|
+
case "unity":
|
|
191
191
|
return .unity
|
|
192
|
-
case "
|
|
192
|
+
case "topon_pte":
|
|
193
193
|
return .toponPte
|
|
194
|
-
case "
|
|
194
|
+
case "custom_mediation":
|
|
195
195
|
return .custom
|
|
196
|
-
case "
|
|
196
|
+
case "direct_monetization_network":
|
|
197
197
|
return .directMonetization
|
|
198
198
|
default:
|
|
199
199
|
return nil
|
|
@@ -271,7 +271,7 @@ public class AppsFlyerPlugin: CAPPlugin {
|
|
|
271
271
|
for url in arr {
|
|
272
272
|
urls.append(url as! String)
|
|
273
273
|
}
|
|
274
|
-
AppsFlyerLib.shared().
|
|
274
|
+
AppsFlyerLib.shared().resolveDeepLinkURLs = urls
|
|
275
275
|
|
|
276
276
|
}
|
|
277
277
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appsflyer-capacitor-plugin",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.2-rc2",
|
|
4
4
|
"iosSdkVersion": "6.15.1",
|
|
5
5
|
"androidSdkVersion": "6.15.1",
|
|
6
|
-
"buildNumber": "
|
|
6
|
+
"buildNumber": "108",
|
|
7
7
|
"description": "AppsFlyer SDK plugin for Capacitor",
|
|
8
8
|
"main": "dist/plugin.cjs.js",
|
|
9
9
|
"module": "dist/esm/index.js",
|
|
@@ -11,17 +11,17 @@ export enum AFConstants {
|
|
|
11
11
|
|
|
12
12
|
export enum MediationNetwork {
|
|
13
13
|
IRONSOURCE = "ironsource",
|
|
14
|
-
APPLOVIN_MAX = "
|
|
15
|
-
GOOGLE_ADMOB = "
|
|
14
|
+
APPLOVIN_MAX = "applovin_max",
|
|
15
|
+
GOOGLE_ADMOB = "google_admob",
|
|
16
16
|
FYBER = "fyber",
|
|
17
17
|
APPODEAL = "appodeal",
|
|
18
|
-
ADMOST = "
|
|
19
|
-
TOPON = "
|
|
20
|
-
TRADPLUS = "
|
|
21
|
-
YANDEX = "
|
|
18
|
+
ADMOST = "admost",
|
|
19
|
+
TOPON = "topon",
|
|
20
|
+
TRADPLUS = "tradplus",
|
|
21
|
+
YANDEX = "yandex",
|
|
22
22
|
CHARTBOOST = "chartboost",
|
|
23
|
-
UNITY = "
|
|
24
|
-
TOPON_PTE = "
|
|
25
|
-
CUSTOM_MEDIATION = "
|
|
26
|
-
DIRECT_MONETIZATION_NETWORK = "
|
|
23
|
+
UNITY = "unity",
|
|
24
|
+
TOPON_PTE = "topon_pte",
|
|
25
|
+
CUSTOM_MEDIATION = "custom_mediation",
|
|
26
|
+
DIRECT_MONETIZATION_NETWORK = "direct_monetization_network",
|
|
27
27
|
}
|