Skip to content

Commit

Permalink
Merge pull request #471 from SourcePointUSA/prepare_7.2.2
Browse files Browse the repository at this point in the history
Prepare 7.2.2
  • Loading branch information
andresilveirah authored Jul 27, 2023
2 parents 13ffe7f + 8779ec4 commit 3d96662
Show file tree
Hide file tree
Showing 178 changed files with 241,301 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 7.2.2 (Jul, 26, 2023)
* [DIA-2463](https://sourcepoint.atlassian.net/browse/DIA-2463),[DIA-2461](https://sourcepoint.atlassian.net/browse/DIA-2461),[DIA-2459](https://sourcepoint.atlassian.net/browse/DIA-2459),[DIA-2453](https://sourcepoint.atlassian.net/browse/DIA-2453) Several improvements to our network layer helping the SDK to better utilize Sourcepoint CDNs' cache.
* [DIA-2309](https://sourcepoint.atlassian.net/browse/DIA-2309),[DIA-2356](https://sourcepoint.atlassian.net/browse/DIA-2356 tvOS layout improvements
* [#466](https://github.com/SourcePointUSA/ios-cmp-app/pull/466) add support to Markdown text on tvOS.

# 7.2.1 (Jul, 18, 2023)
* [DIA-2370](https://sourcepoint.atlassian.net/browse/DIA-2370) Fixed an issue causing the SDK to show a wrong state for the "Do not sell" button on CCPA messages. [#454](https://github.com/SourcePointUSA/ios-cmp-app/pull/454)
* [DIA-2229](https://sourcepoint.atlassian.net/browse/DIA-2229) Fixed an issue causing the tvOS message to show a Sourcepoint logo briefly before loading the real image. [#460](https://github.com/SourcePointUSA/ios-cmp-app/pull/460)
Expand Down
2 changes: 1 addition & 1 deletion ConsentViewController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ConsentViewController'
s.version = '7.2.1'
s.version = '7.2.2'
s.summary = 'SourcePoint\'s ConsentViewController to handle privacy consents.'
s.homepage = 'https://www.sourcepoint.com'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion ConsentViewController/Classes/SPConsentManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ import UIKit
}

@objc extension SPConsentManager: SPSDK {
public static let VERSION = "7.2.1"
public static let VERSION = "7.2.2"

public var gdprApplies: Bool { spCoordinator.userData.gdpr?.applies ?? false }

Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- ConsentViewController (7.2.1):
- ConsentViewController (7.2.2):
- Down (~> 0.9.0)
- Down (0.9.5)
- IQKeyboardManagerSwift (6.5.10)
Expand Down Expand Up @@ -33,7 +33,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
ConsentViewController: b4bc3ccbeb4d1659b61609ba956b61c4aa78fa86
ConsentViewController: 86c2da23b896dbe2e3aae030f94a7a153fc5379c
Down: 7321a72d0747ed0061dce948bcff518fcb6df2bd
IQKeyboardManagerSwift: 52962c76ab33532f15ad9f3ff4e5715eda5335bb
JSONView: ba9049102fae7ad70de40234d0b7c60986e61e4c
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
In your `Podfile` add the following line to your app target:

```
pod 'ConsentViewController', '7.2.1'
pod 'ConsentViewController', '7.2.2'
```

### Carthage
Expand Down
67 changes: 67 additions & 0 deletions XCFramework/ConsentViewController.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>ConsentViewController.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>ConsentViewController.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>ConsentViewController.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>tvos-arm64</string>
<key>LibraryPath</key>
<string>ConsentViewController.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
var postToWebView = function (webview) {
return function(name, body) {
webview.postMessage({ name: name, body: body || {} }, "*");
};
}(window.webkit.messageHandlers.SPJSReceiver);

window.SDK = function (postToWebView) {
return {
loadMessage: function(messageJSON) {
var messagePayload = Object.assign({}, messageJSON, {
name: "sp.loadMessage",
fromNativeSDK: true
});
window.postMessage(messagePayload, "*");
},
readyForPreload: function () {
postToWebView("readyForPreload");
},
onMessageReady: function() {
postToWebView("onMessageReady");
},
onPMReady: function() {
postToWebView("onPMReady");
},
onAction: function(action) {
postToWebView("onAction", action);
},
onError: function(error) {
postToWebView("onError", { error: error });
},
onMessageEvent: function(payload) {
postToWebView("onMessageEvent", payload);
}
};
}(postToWebView);

var getActionFromMessage = function (eventData) {
var choiceAction = eventData.payload.filter(function (action) {
return action.type === 'choice';
})[0] || {};
var choiceData = choiceAction.data || {};
return {
id: String(choiceData.choice_id),
type: choiceData.type,
pm_url: choiceData.iframe_url,
consentLanguage: eventData.consentLanguage,
customActionId: choiceData.customAction
};
};

var handleMessageEvent = function(SDK) {
return function(eventData) {
switch(eventData.name) {
case "sp.readyForPreload":
SDK.readyForPreload();
break;
case "sp.loadMessage":
/* do nothing */
break;
case "sp.showMessage":
eventData.fromPM ? SDK.onPMReady() : SDK.onMessageReady();
break;
case "sp.hideMessage":
eventData.fromPM ?
SDK.onAction({
type: eventData.actionType,
payload: eventData.payload,
consentLanguage: eventData.consentLanguage,
customActionId: eventData.customAction
}) :
SDK.onAction(getActionFromMessage(eventData));
break;
case "sp.renderingAppError":
SDK.onError(eventData);
break;
default:
eventData.payload.action = eventData.name;
SDK.onMessageEvent(eventData);
}
};
};

function isFromPM(event) {
event.settings = event.settings || {};
return event.fromPM || event.settings.vendorList;
}

function isError(event) {
return event.stackTrace !== undefined;
}

function handleError(event) {
window.SDK.onError({
code: event.code,
title: event.title,
stackTrace: event.stackTrace
});
}

var handleMessageOrPMEvent = function (SDK) {
return function (event) {
var data = event.data;
try {
isError(event) ? handleError(event) : handleMessageEvent(SDK)({
name: data.name,
fromPM: isFromPM(data),
actionType: data.actionType,
payload: data.payload || data.actions || {},
consentLanguage: data.consentLanguage,
customAction: data.customAction
});
} catch (error) {
SDK.onError(error);
}
};
};

window.addEventListener("message", handleMessageOrPMEvent(window.SDK));
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require("./SPJSReceiver")

it.skip("SPJSReceiver", () => {

})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3d96662

Please sign in to comment.