Skip to content

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.

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.

To begin using the Secure Privacy SDK for tvOS, you can integrate it using XCFramework or Swift Package Manager (SPM).

  1. Download the SPTVConsent.xcframework.
  2. Open your Xcode project.
  3. Drag and drop SPTVConsent.xcframework into your project.
  4. Go to Targets → Frameworks, Libraries, and Embedded Content.
  5. Ensure SPTVConsent.xcframework is listed, and set to Embed & Sign.
Option 2: Using Swift Package Manager (SPM)
Section titled “Option 2: Using Swift Package Manager (SPM)”
  1. In Xcode, go to: File → Add Packages
  2. Enter the URL:
https://github.com/secureprivacy/tvos-sdk-spm.git
  1. Set the version requirement to: Exact Version0.1.4-beta
  2. Add the SPTVConsent library to your target.

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.data

This will set up the SDK and enable access to its features.

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.

Check out Secure Privacy Android SDK – Example App on GitHub!

👉 View the Example App