Skip to content

Setup and Installation

The Secure Privacy Consent Management SDK provides iOS 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 iOS, you can integrate it using XCFramework, CocoaPods or Swift Package Manager (SPM).

  1. Download the SPMobileConsent.xcframework.
  2. Open your Xcode project.
  3. Drag and drop SPMobileConsent.xcframework into your project.
  4. Go to Targets → Frameworks, Libraries, and Embedded Content.
  5. Ensure SPMobileConsent.xcframework is listed, and set to Embed & Sign.
  1. Add the following line to your Podfile:
pod 'SecurePrivacyMobileConsent'
  1. Run the following command:
Terminal window
pod install
  1. Open the .xcworkspace file to launch your project with the integrated SDK.
Option 3: Using Swift Package Manager (SPM)
Section titled “Option 3: Using Swift Package Manager (SPM)”
  1. In Xcode, go to: File → Add Packages
  2. Enter the URL:
https://github.com/secureprivacy/ios-sdk-spm.git
  1. Set the version requirement to: Exact Version0.2.6-beta
  2. Add the SPMobileConsent 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 SPMobileConsent
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.

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

👉 View the Example App