Skip to content

Commit 74b3f40

Browse files
authored
Merge pull request #55 from SourcePointUSA/release-2.3.2
Release 2.3.2
2 parents 62019c3 + dd2f552 commit 74b3f40

File tree

8 files changed

+32
-10
lines changed

8 files changed

+32
-10
lines changed

Assets/ConsentManagementProvider/Plugins/iOS/Source/SwiftBridge.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,14 @@ import UIKit
165165

166166
// MARK: - Manage lib
167167
@objc public func loadMessage(authId: String? = nil) {
168-
print("PURE SWIFT loadMessage")
169-
(consentManager != nil) ?
168+
print("PURE SWIFT loadMessage with authId="+(authId ?? "nil"))
169+
(consentManager != nil) ?
170170
consentManager?.loadMessage(forAuthId: authId) :
171171
self.runCallback(callback: self.callbackOnErrorCallback, arg: "Library was not initialized correctly!")
172172
}
173173

174174
@objc public func onClearConsentTap() {
175+
print("PURE SWIFT onClearConsentTap")
175176
SPConsentManager.clearAllData()
176177
myVendorAccepted = .Unknown
177178
}

Assets/ConsentManagementProvider/Plugins/iOS/Source/Unity.mm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ void _configLib(int accountId, int propertyId, char* propertyName, bool gdpr, bo
8686
[swiftBridge configLibWithAccountId:accountId propertyId:propertyId propertyName:[NSString stringWithFormat:@"%s", propertyName] gdpr:gdpr ccpa:ccpa usnat:usnat language:language gdprPmId:[NSString stringWithFormat:@"%s", gdprPmId] ccpaPmId:[NSString stringWithFormat:@"%s", ccpaPmId] usnatPmId:[NSString stringWithFormat:@"%s", usnatPmId]];
8787
}
8888

89-
void _loadMessage(char * authId)
89+
void _loadMessage()
90+
{
91+
[swiftBridge loadMessageWithAuthId:nil];
92+
}
93+
94+
void _loadMessageWithAuthId(char * authId)
9095
{
9196
[swiftBridge loadMessageWithAuthId:[NSString stringWithFormat:@"%s", authId]];
9297
}

Assets/ConsentManagementProvider/Scripts/json/JsonUnwrapper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ private static GdprConsent UnwrapGdprConsent(GdprConsentWrapper wrapped)
271271

272272
var vendorGrantValue = JToken.FromObject(vendorGrantWrapper.Value);
273273

274-
if (vendorGrantValue["granted"] != null)
275-
isGranted = vendorGrantValue["granted"].ToObject<bool>();
274+
if (vendorGrantValue["vendorGrant"] != null)
275+
isGranted = vendorGrantValue["vendorGrant"].ToObject<bool>();
276276

277277
if (vendorGrantValue["purposeGrants"] != null)
278278
{
@@ -410,4 +410,4 @@ private static UsnatConsent UnwrapUsnatConsent(UsnatConsentWrapper wrapped)
410410
}
411411
#endregion
412412
}
413-
}
413+
}

Assets/ConsentManagementProvider/Scripts/wrapper/iOS/ConsentWrapperIOS.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ private set
3939
[DllImport("__Internal")]
4040
private static extern void _configLib(int accountId, int propertyId, string propertyName, bool gdpr, bool ccpa, bool usnat, MESSAGE_LANGUAGE language, string gdprPmId, string ccpaPmId, string usnatPmId);
4141
[DllImport("__Internal")]
42-
private static extern void _loadMessage(string authId);
42+
private static extern void _loadMessage();
43+
[DllImport("__Internal")]
44+
private static extern void _loadMessageWithAuthId(string authId);
4345
[DllImport("__Internal")]
4446
private static extern void _loadGDPRPrivacyManager();
4547
[DllImport("__Internal")]
@@ -126,7 +128,16 @@ public void InitializeLib(
126128
public void LoadMessage(string authId = null)
127129
{
128130
#if UNITY_IOS && !UNITY_EDITOR_OSX
129-
_loadMessage(authId);
131+
if (string.IsNullOrEmpty(authId))
132+
{
133+
CmpDebugUtil.Log("Calling load message without authId");
134+
_loadMessage();
135+
}
136+
else
137+
{
138+
CmpDebugUtil.Log($"Calling load message with authId={authId}");
139+
_loadMessageWithAuthId(authId);
140+
}
130141
#endif
131142
}
132143

Assets/ExternalDependencyManager/Editor/SourcepointDependencies.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* "subspecs" (optional)
3232
Subspecs to include for the pod.
3333
-->
34-
<iosPod name="ConsentViewController" version="7.6.4" bitcodeEnabled="true"
34+
<iosPod name="ConsentViewController" version="7.6.8" bitcodeEnabled="true"
3535
minTargetSdk="10.0" addToAllTargets="true">
3636

3737
</iosPod>

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2.3.2
2+
* Unity SDK brought v7.6.8 iOS [#55](https://github.com/SourcePointUSA/unity-sdk/pull/55)
3+
* [DIA-4048] (https://sourcepoint.atlassian.net/browse/DIA-4048) Fix: of the null authId interpreted as "" (an empty string) [#55](https://github.com/SourcePointUSA/unity-sdk/pull/55)
4+
* Fix: JsonUnwrapper on iOS has incorrect key for VendorGrant [#57](https://github.com/SourcePointUSA/unity-sdk/pull/57) by @OmarVector
5+
16
# 2.3.1
27
* [DIA-3844](https://sourcepoint.atlassian.net/browse/DIA-3844) Destroy CMPiOSListenerHelper GameObject in Dispose() call and re-initialize it in CMP.Initialize() call if needed. Also, ClearAllData() method for IOS clears cached value in c# [#53](https://github.com/SourcePointUSA/unity-sdk/pull/53)
38

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.sourcepoint.unitycmp",
33
"displayName": "Sourcepoint Consent Message Plugin",
4-
"version": "2.3.1",
4+
"version": "2.3.2",
55
"unity": "2021.3",
66
"description": "Native UI Privacy Manager for both GDPR and CCPA legislations.",
77
"author": {
Binary file not shown.

0 commit comments

Comments
 (0)