Setup and Installation
Overview
Section titled “Overview”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.
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 iOS, you can integrate it using XCFramework, CocoaPods or Swift Package Manager (SPM).
Option 1: Using XCFramework
Section titled “Option 1: Using XCFramework”- Download the SPMobileConsent.xcframework.
- Open your Xcode project.
- Drag and drop
SPMobileConsent.xcframework
into your project. - Go to Targets → Frameworks, Libraries, and Embedded Content.
- Ensure
SPMobileConsent.xcframework
is listed, and set to Embed & Sign.
Option 2: Using CocoaPods
Section titled “Option 2: Using CocoaPods”- Add the following line to your Podfile:
pod 'SecurePrivacyMobileConsent'
- Run the following command:
pod install
- 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)”- In Xcode, go to: File → Add Packages
- Enter the URL:
https://github.com/secureprivacy/ios-sdk-spm.git
- Set the version requirement to:
Exact Version →
0.2.6-beta
- Add the
SPMobileConsent
library 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 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.
Explore the Example App
Section titled “Explore the Example App”Check out Secure Privacy Android SDK – Example App on GitHub!