Introduction
The Unified Consent iOS SDK provides a comprehensive solution for managing user privacy choices and consent. Here's how to integrate and launch the UI in your iOS application:
Basic Integration
import UIKit
import UnifiedConsentSDK
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
UnifiedConsentSDKSwift.shared.initWith(
view: self,
configId: Environment.current.configId,
customerId: Environment.current.customerId
)
}
}
note
The configId
and customerId
parameters are mandatory and must match your configuration on the Osano website.
Configuration Options
Pre-verified Email
If you already have a verified email address for the user, you can set it before initialization:
UnifiedConsentSDKSwift.shared.verifiedEmailAddress = "user@example.com"
Verbose logging
UnifiedConsentSDKSwift.shared.verbose = true