Skip to content

Commit b5bf286

Browse files
authored
Merge pull request #44 from SourcePointUSA/DIA-3350-update-ios-sdk-to-7.6.3
DIA-3350 update ios sdk to 7.6.3
2 parents cb45e11 + 6223bb3 commit b5bf286

File tree

7 files changed

+31
-24
lines changed

7 files changed

+31
-24
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ extension SwiftBridge {
290290
}
291291

292292
@objc public func setCallbackOnCustomConsent(callback: @escaping СallbackCharMessage) -> Void{
293-
print("setCallbackOnSPFinished")
293+
print("setCallbackOnCustomConsent")
294294
callbackOnCustomConsent = callback
295295
}
296296

Assets/ConsentManagementProvider/Scripts/json/JsonUnwrapper.cs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ public static SpGdprConsent UnwrapSpGdprConsentAndroid(SpGdprConsentWrapperAndro
102102
}
103103
}
104104

105-
unwrapped.googleConsentMode = new SPGCMData(
106-
wrappedGdpr.gcmStatus.ad_storage,
107-
wrappedGdpr.gcmStatus.analytics_storage,
108-
wrappedGdpr.gcmStatus.ad_user_data,
109-
wrappedGdpr.gcmStatus.ad_personalization
110-
);
105+
if (wrappedGdpr.gcmStatus != null)
106+
{
107+
unwrapped.googleConsentMode = new SPGCMData(
108+
wrappedGdpr.gcmStatus.ad_storage,
109+
wrappedGdpr.gcmStatus.analytics_storage,
110+
wrappedGdpr.gcmStatus.ad_user_data,
111+
wrappedGdpr.gcmStatus.ad_personalization
112+
);
113+
}
111114

112115
return new SpGdprConsent(unwrapped);
113116
}
@@ -242,12 +245,15 @@ private static GdprConsent UnwrapGdprConsent(GdprConsentWrapper wrapped)
242245
unwrapped.consentStatus = UnwrapConsentStatus(wrapped.consentStatus);
243246
}
244247

245-
unwrapped.googleConsentMode = new SPGCMData(
246-
wrapped.gcmStatus.ad_storage,
247-
wrapped.gcmStatus.analytics_storage,
248-
wrapped.gcmStatus.ad_user_data,
249-
wrapped.gcmStatus.ad_personalization
250-
);
248+
if (wrapped.gcmStatus != null)
249+
{
250+
unwrapped.googleConsentMode = new SPGCMData(
251+
wrapped.gcmStatus.ad_storage,
252+
wrapped.gcmStatus.analytics_storage,
253+
wrapped.gcmStatus.ad_user_data,
254+
wrapped.gcmStatus.ad_personalization
255+
);
256+
}
251257

252258
return unwrapped;
253259
}

Assets/ConsentManagementProvider/Scripts/json/wrappers/GdprConsentWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ internal class GdprConsentWrapper
1212
public bool applies;
1313
public string webConsentPayload;
1414
public ConsentStatusWrapper consentStatus;
15-
public GCMDataWrapper gcmStatus;
15+
public GCMDataWrapper? gcmStatus;
1616
}
1717
}

Assets/ConsentManagementProvider/Scripts/model/common/GdprConsent.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class GdprConsent
1313
public Dictionary<string, SpVendorGrant> grants;
1414
public List<string> acceptedCategories;
1515
public ConsentStatus consentStatus;
16-
public SPGCMData googleConsentMode;
16+
public SPGCMData? googleConsentMode;
1717

1818
public string ToFullString()
1919
{
@@ -55,7 +55,8 @@ public string ToFullString()
5555
sb.AppendLine($" {category}");
5656
}
5757

58-
sb.AppendLine($"adStorage: {googleConsentMode.adStorage}, analyticsStorage: {googleConsentMode.analyticsStorage}, adUserData: {googleConsentMode.adUserData}, adPersonalization: {googleConsentMode.adPersonalization}");
58+
if(googleConsentMode != null)
59+
sb.AppendLine($"adStorage: {googleConsentMode.adStorage}, analyticsStorage: {googleConsentMode.analyticsStorage}, adUserData: {googleConsentMode.adUserData}, adPersonalization: {googleConsentMode.adPersonalization}");
5960

6061
return sb.ToString();
6162
}

Assets/ExampleApp/Scenes/SourcepointSampleScene.unity

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ RectTransform:
431431
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
432432
m_AnchorMin: {x: 0.5, y: 0.5}
433433
m_AnchorMax: {x: 0.5, y: 0.5}
434-
m_AnchoredPosition: {x: 0, y: -945.9999}
434+
m_AnchoredPosition: {x: 0, y: -1145.9999}
435435
m_SizeDelta: {x: 720, y: 180}
436436
m_Pivot: {x: 0.5, y: 0.5}
437437
--- !u!114 &448136250
@@ -577,7 +577,7 @@ RectTransform:
577577
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
578578
m_AnchorMin: {x: 0.5, y: 0.5}
579579
m_AnchorMax: {x: 0.5, y: 0.5}
580-
m_AnchoredPosition: {x: 676, y: 79.456}
580+
m_AnchoredPosition: {x: 0, y: -945}
581581
m_SizeDelta: {x: 720, y: 180}
582582
m_Pivot: {x: 0.5, y: 0.5}
583583
--- !u!114 &506840119
@@ -1613,7 +1613,7 @@ MonoBehaviour:
16131613
m_HorizontalOverflow: 0
16141614
m_VerticalOverflow: 0
16151615
m_LineSpacing: 1
1616-
m_Text: Clear Data
1616+
m_Text: Delete custom consent
16171617
--- !u!222 &1196510775
16181618
CanvasRenderer:
16191619
m_ObjectHideFlags: 0

Assets/ExampleApp/Scripts/PrivacySettings.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ public void OnClearCustomConsentDataPress()
129129
legIntCategories: this.legIntCategories,
130130
onSuccessDelegate: SuccessDelegate
131131
);
132-
storedConsentString = null;
133132
updateUI();
134133
}
135134

@@ -142,7 +141,8 @@ public void OnLoadMessagePress()
142141

143142
public void OnConsentReady(SpConsents consents)
144143
{
145-
storedConsentString = consents.gdpr.consents.euconsent;
144+
storedConsentString = consents.gdpr.consents.euconsent ?? "--";
145+
CmpDebugUtil.Log(consents.gdpr.consents.ToFullString());
146146
updateUI();
147147
}
148148

@@ -151,8 +151,8 @@ private void updateUI()
151151
if (storedConsentString != null)
152152
{
153153
loadMessageButton.interactable = false;
154-
gdprPrivacySettingsButton.interactable = true;
155-
ccpaPrivacySettingsButton.interactable = true;
154+
gdprPrivacySettingsButton.interactable = useGDPR;
155+
ccpaPrivacySettingsButton.interactable = useCCPA;
156156
customConsentButton.interactable = true;
157157
clearDataButton.interactable = true;
158158
consentValueText.text = storedConsentString;

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.0" bitcodeEnabled="true"
34+
<iosPod name="ConsentViewController" version="7.6.3" bitcodeEnabled="true"
3535
minTargetSdk="10.0" addToAllTargets="true">
3636

3737
</iosPod>

0 commit comments

Comments
 (0)