Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions ConsentViewController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Pod::Spec.new do |s|
s.source = { :git => 'https://github.com/SourcePointUSA/ios-cmp-app.git', :tag => s.version.to_s }
s.swift_version = '5.1'
s.source_files = 'ConsentViewController/Classes/**/*'
s.dependency 'Didomi-XCFramework', '2.45.0'
## uncomment to use local version of Didomi SDK
# s.vendored_frameworks = 'Didomi.xcframework'
s.dependency 'SPMobileCore', '0.1.13'
s.ios.deployment_target = '10.0'
s.ios.exclude_files = 'ConsentViewController/Classes/Views/tvOS'
Expand Down

Large diffs are not rendered by default.

290 changes: 288 additions & 2 deletions Example/ConsentViewController.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

73 changes: 42 additions & 31 deletions Example/ConsentViewController/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions Example/ConsentViewController/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ViewController: UIViewController {
preferenceCenterId: "1306779"
))}()

lazy var consentManager: SPSDK = { SPConsentManager(
lazy var consentManager: SPDidomiConsentManager = { SPDidomiConsentManager(
accountId: config.accountId,
propertyId: config.propertyId,
propertyName: try! SPPropertyName(config.propertyName), // swiftlint:disable:this force_try
Expand All @@ -61,6 +61,7 @@ class ViewController: UIViewController {
sdkStatus = .running
sdkStatusLabel.accessibilityIdentifier = "sdkStatusLabel"
myVendorAcceptedLabel.accessibilityIdentifier = "customVendorLabel"
consentManager.didomiUIController = self
consentManager.loadMessage(forAuthId: nil, publisherData: ["foo": AnyEncodable(99)])
updateUI()
}
Expand All @@ -69,8 +70,12 @@ class ViewController: UIViewController {
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "wormholy_fire"), object: nil)
}

@IBAction func onLoadMessagesTap(_ sender: Any) {
consentManager.loadMessage(forAuthId: nil, publisherData: ["foo": AnyEncodable(99)])
}

@IBAction func onClearConsentTap(_ sender: Any) {
SPConsentManager.clearAllData()
SPDidomiConsentManager.clearAllData()
myVendorAccepted = .Unknown
updateUI()
}
Expand Down Expand Up @@ -119,6 +124,7 @@ class ViewController: UIViewController {
// MARK: - SPDelegate implementation
extension ViewController: SPDelegate {
func onSPUIReady(_ controller: UIViewController) {
print("onSPUIReady")
present(controller, animated: true)
}

Expand All @@ -129,6 +135,7 @@ extension ViewController: SPDelegate {
}

func onSPUIFinished(_ controller: UIViewController) {
print("onSPUIFinished")
updateUI()
dismiss(animated: true)
}
Expand Down
8 changes: 6 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
PODS:
- ConsentViewController (7.12.7-beta.4):
- ConsentViewController (7.12.7-rc.3):
- Didomi-XCFramework (= 2.45.0)
- SPMobileCore (= 0.1.13)
- Didomi-XCFramework (2.45.0)
- FirebaseAnalytics (11.13.0):
- FirebaseAnalytics/AdIdSupport (= 11.13.0)
- FirebaseCore (~> 11.13.0)
Expand Down Expand Up @@ -142,6 +144,7 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- Didomi-XCFramework
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreInternal
Expand Down Expand Up @@ -170,7 +173,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
ConsentViewController: f5a72b3c2ff72858314cc4df3a1200c33556656c
ConsentViewController: d87f3f8fce0414724d7e63f2bded0a6b85b99950
Didomi-XCFramework: ff328023bf9a544b19cf124eb9eaa05e9fbe810d
FirebaseAnalytics: 630349facf4a114a0977e5d7570e104261973287
FirebaseCore: c692c7f1c75305ab6aff2b367f25e11d73aa8bd0
FirebaseCoreInternal: 29d7b3af4aaf0b8f3ed20b568c13df399b06f68c
Expand Down
112 changes: 112 additions & 0 deletions Example/Pods/Didomi-XCFramework/Didomi.xcframework/Info.plist

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

Binary file not shown.
Binary file not shown.
Loading