Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit c9defb3

Browse files
prepare for 1.3.1 release
1 parent b785107 commit c9defb3

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

CCPAConsentViewController.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CCPAConsentViewController'
3-
s.version = '1.3.0'
3+
s.version = '1.3.1'
44
s.summary = 'SourcePoint\'s CCPAConsentViewController to handle privacy consents.'
55
s.homepage = 'https://www.sourcepoint.com'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.3.1 (Aug, 13, 2020)
2+
* Fix an issue that'd prevent the `onAction` delegate method from being called #47
3+
* Implement `.description` to `Action` class #46
4+
* Make sure `onConsentReady` is called on all actions that closes the ConsentUI #41
5+
16
## 1.3.0 (Jun, 12, 2020)
27
* Store the `IABUSPrivacy_String` as spec'ed by the [CCPA IAB](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/USP%20API.md#in-app-support).
38
* Store the "ccpa applies" boolean. This is not covered by the IAB CCPA In-app spec so we're using our own key. It can be retrieved by reading it from the `UserDefaults` with:

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ We strongly recommend the use of [CocoaPods](https://cocoapods.org) in order to
88
In your `Podfile` add the following line to your app target:
99

1010
```
11-
pod 'CCPAConsentViewController', '1.3.0'
11+
pod 'CCPAConsentViewController', '1.3.1'
1212
```
1313
### Carthage
1414
We also support [Carthage](https://github.com/Carthage/Carthage). It requires a couple more steps to install so we dedicated a whole [wiki page](https://github.com/SourcePointUSA/CCPA_iOS_SDK/wiki/Carthage-SDK-integration-guide) for it.
@@ -33,8 +33,6 @@ It's pretty simple, here are 5 easy steps for you:
3333
import CCPAConsentViewController
3434

3535
class ViewController: UIViewController {
36-
let logger = Logger()
37-
3836
lazy var consentViewController: CCPAConsentViewController = { return CCPAConsentViewController(
3937
accountId: 22,
4038
propertyId: 6099,
@@ -63,15 +61,22 @@ extension ViewController: ConsentDelegate {
6361
dismiss(animated: true, completion: nil)
6462
}
6563

64+
func onAction(_ action: Action, consents: PMConsents?) {
65+
print("Action taken:", action)
66+
}
67+
6668
func onConsentReady(consentUUID: ConsentUUID, userConsent: UserConsent) {
67-
print("consentUUID: \(consentUUID)")
68-
print("userConsents: \(userConsent)")
69+
print("consentUUID:", consentUUID)
70+
print("userConsents:", userConsent)
71+
6972
print("CCPA applies:", UserDefaults.standard.bool(forKey: CCPAConsentViewController.CCPA_APPLIES_KEY))
70-
print("US Privacy String:", UserDefaults.standard.string(forKey: CCPAConsentViewController.IAB_PRIVACY_STRING_KEY)!)
73+
74+
// the us privacy string can also be accessed via userConsent.uspstring
75+
print("US Privacy String:", UserDefaults.standard.string(forKey: CCPAConsentViewController.IAB_PRIVACY_STRING_KEY) ?? "")
7176
}
7277

7378
func onError(error: CCPAConsentViewControllerError?) {
74-
logger.log("Error: %{public}@", [error?.description ?? "Something Went Wrong"])
79+
print("Error:", error.debugDescription)
7580
}
7681
}
7782
```

0 commit comments

Comments
 (0)