cordova-plugin-onetrust-cmp 6.23.0 → 6.27.0
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/CHANGELOG.md +12 -0
- package/package.json +9 -1
- package/plugin.xml +3 -3
- package/src/android/OneTrust.java +13 -3
- package/src/ios/OneTrust.swift +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# 6.27.0
|
|
2
|
+
* Update to OneTrust version 6.27.0
|
|
3
|
+
|
|
4
|
+
# 6.26.0
|
|
5
|
+
* Update to OneTrust version 6.26.0
|
|
6
|
+
|
|
7
|
+
# 6.25.0
|
|
8
|
+
* Update to OneTrust version 6.25.1 on iOS and 6.25.0 on Android
|
|
9
|
+
|
|
10
|
+
# 6.24.0
|
|
11
|
+
* Update to OneTrust version 6.24.0
|
|
12
|
+
|
|
1
13
|
# 6.23.0
|
|
2
14
|
* Update to OneTrust version 6.23.0
|
|
3
15
|
* Fixed issue where iOS would run into a compiler error on older build systems
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cordova-plugin-onetrust-cmp",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.27.0",
|
|
4
4
|
"description": "OneTrust is the leading Consent Management solution provider. This plugin exposes OneTrust's native CMP functionality to Cordova and Ionic environments.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
},
|
|
8
|
+
"files":[
|
|
9
|
+
"src",
|
|
10
|
+
"www",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"plugin.xml",
|
|
13
|
+
"README-Ionic.md",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
8
16
|
"keywords": [
|
|
9
17
|
"cmp",
|
|
10
18
|
"consent",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="cordova-plugin-onetrust-cmp" version="6.
|
|
2
|
+
<plugin id="cordova-plugin-onetrust-cmp" version="6.27.0"
|
|
3
3
|
xmlns="http://apache.org/cordova/ns/plugins/1.0"
|
|
4
4
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
5
5
|
<name>OneTrust</name>
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
<config>
|
|
19
19
|
</config>
|
|
20
20
|
<pods use-frameworks="true">
|
|
21
|
-
<pod name="OneTrust-CMP-XCFramework" spec="~> 6.
|
|
21
|
+
<pod name="OneTrust-CMP-XCFramework" spec="~> 6.27.0.0" />
|
|
22
22
|
</pods>
|
|
23
23
|
</podspec>
|
|
24
24
|
</platform>
|
|
25
25
|
<platform name="android">
|
|
26
|
-
<framework src="com.onetrust.cmp:native-sdk:6.
|
|
26
|
+
<framework src="com.onetrust.cmp:native-sdk:6.27.0.0" />
|
|
27
27
|
<framework src="androidx.appcompat:appcompat:1.2.0" />
|
|
28
28
|
<config-file parent="/*" target="res/xml/config.xml">
|
|
29
29
|
<feature name="OneTrust">
|
|
@@ -126,9 +126,14 @@ public class OneTrust extends CordovaPlugin{
|
|
|
126
126
|
final String IDENTIFIER = "identifier";
|
|
127
127
|
final String JWT = "syncProfileAuth";
|
|
128
128
|
final String UX_PARAMS_JSON = "androidUXParams";
|
|
129
|
+
final String API_VERSION = "setAPIVersion";
|
|
130
|
+
String countryCode;
|
|
131
|
+
String regionCode;
|
|
132
|
+
String apiVersion;
|
|
129
133
|
|
|
130
134
|
OTSdkParams.SdkParamsBuilder sdkParamsBuilder = OTSdkParams.SdkParamsBuilder.newInstance();
|
|
131
135
|
|
|
136
|
+
/* Add UXParams object to paramsbuilder if it's present in the payload*/
|
|
132
137
|
if(initParams.has(UX_PARAMS_JSON)){
|
|
133
138
|
JSONObject uxParamsJSON = initParams.optJSONObject(UX_PARAMS_JSON);
|
|
134
139
|
OTUXParams uxParams = OTUXParams.OTUXParamsBuilder.newInstance()
|
|
@@ -137,9 +142,6 @@ public class OneTrust extends CordovaPlugin{
|
|
|
137
142
|
sdkParamsBuilder.setOTUXParams(uxParams);
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
String countryCode;
|
|
141
|
-
String regionCode;
|
|
142
|
-
|
|
143
145
|
if(initParams.has(COUNTRY_CODE)){
|
|
144
146
|
countryCode = initParams.optString(COUNTRY_CODE);
|
|
145
147
|
sdkParamsBuilder.setOTCountryCode(countryCode);
|
|
@@ -150,6 +152,14 @@ public class OneTrust extends CordovaPlugin{
|
|
|
150
152
|
sdkParamsBuilder.setOTRegionCode(regionCode);
|
|
151
153
|
}
|
|
152
154
|
|
|
155
|
+
if(initParams.has(API_VERSION)){
|
|
156
|
+
apiVersion = initParams.optString(API_VERSION);
|
|
157
|
+
sdkParamsBuilder.setAPIVersion(apiVersion);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/*If sync params are present in the payload, add them to the object.
|
|
161
|
+
This function will fail gracefully if either the identifier or JWT are missing.
|
|
162
|
+
This also automatically turns on setSyncProfile and shouldCreateProfile. */
|
|
153
163
|
if(initParams.has(SYNC_PARAMS)){
|
|
154
164
|
JSONObject paramsObj = initParams.optJSONObject(SYNC_PARAMS);
|
|
155
165
|
if(paramsObj.has(IDENTIFIER) && paramsObj.has(JWT)){
|
package/src/ios/OneTrust.swift
CHANGED
|
@@ -68,6 +68,11 @@ import AppTrackingTransparency
|
|
|
68
68
|
OTParams.setProfileSyncParams(profileSyncParams)
|
|
69
69
|
OTParams.setShouldCreateProfile("true")
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
//If setAPIVersion is defined, add it to the params object.
|
|
73
|
+
if let overrideVersion = params.value(forKey: "setAPIVersion") as? String{
|
|
74
|
+
OTParams.setSDKVersion(overrideVersion)
|
|
75
|
+
}
|
|
71
76
|
|
|
72
77
|
return OTParams
|
|
73
78
|
}
|