Setup and Installation
Overview
Section titled “Overview”The Secure Privacy Consent Management SDK provides tvOS developers with an easy way to manage user consent within their applications. By integrating this SDK, you can ensure compliance with privacy regulations while giving users control over their data preferences.
Getting Started
Section titled “Getting Started”Obtain Your Application ID
Section titled “Obtain Your Application ID”To use the Secure Privacy SDK, you need an Application ID. Sign up for a free trial at Secure Privacy to get your Application ID.
Installation
Section titled “Installation”To begin using the Secure Privacy SDK for tvOS, you can integrate it using XCFramework or Swift Package Manager (SPM).
Option 1: Using XCFramework
Section titled “Option 1: Using XCFramework”- Download the SPTVConsent.xcframework.
- Open your Xcode project.
- Drag and drop
SPTVConsent.xcframeworkinto your project. - Go to Targets → Frameworks, Libraries, and Embedded Content.
- Ensure
SPTVConsent.xcframeworkis listed, and set to Embed & Sign.
Option 2: Using Swift Package Manager (SPM)
Section titled “Option 2: Using Swift Package Manager (SPM)”- In Xcode, go to: File → Add Packages
- Enter the URL:
https://github.com/secureprivacy/tvos-sdk-spm.git- Set the version requirement to:
Exact Version →
0.1.4-beta - Add the
SPTVConsentlibrary to your target.
Initialization
Section titled “Initialization”To initialize the SDK, call the following method in your app’s entry point (typically in AppDelegate.swift or SceneDelegate.swift):
import SPTVConsent
let result = await SPConsentEngineFactory.initialise( key: SPAuthKey( applicationId: "YOUR_APPLICATION_ID", secondaryApplicationId: "YOUR_SECONDARY_APPLICATION_ID" ))let spConsentEngine = result.dataThis will set up the SDK and enable access to its features.
Asset Configuration Note
Section titled “Asset Configuration Note”When configuring your tvOS app on https://cmp.secureprivacy.ai
Please use PNG or JPG for the banner logo. SVG images are currently not supported by the SDK.
Explore the Example App
Section titled “Explore the Example App”Check out Secure Privacy Android SDK – Example App on GitHub!