Skip to main content

Overview

The User Messaging Platform (UMP) SDK helps you manage user consent for personalized advertising in compliance with GDPR (General Data Protection Regulation) and CCPA (California Consumer Privacy Act).
UMP integration requires the adrop-ads-backfill module. Make sure you have completed the Getting Started installation guide first.

Basic Usage

Use the Consent Manager to request user consent after initializing Adrop.
import AdropAds

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Call after Adrop.initialize()
        Adrop.consentManager?.requestConsentInfoUpdate(from: self) { result in
            if let error = result.error {
                print("Consent error: \(error)")
            }
        }
    }
}

The consent manager returns one of the following statuses:
StatusDescription
unknownConsent status not yet determined
requiredConsent required (popup will be shown)
notRequiredConsent not required (non-GDPR region)
obtainedConsent already obtained

Debug Settings (Test Mode)

Test GDPR/CCPA consent flows during development:
import AdropAds

#if DEBUG
// Set debug geography before requesting consent
Adrop.consentManager?.setDebugSettings(
    testDeviceIdentifiers: ["YOUR_DEVICE_IDENTIFIER"],  // Check Xcode console
    geography: .EEA  // Test GDPR
)

// Reset consent for testing
Adrop.consentManager?.reset()
#endif

Debug Geographies

GeographyDescription
disabledUse actual device location
EEATest GDPR (European Economic Area)
regulatedUSStateTest CCPA (California, etc.)
otherTest non-regulated regions
Debug settings should only be used during development. Remove or disable them before releasing to production.

Best Practices

Request Early

Request consent as early as possible in your app lifecycle, ideally right after SDK initialization.

Handle Errors

Always handle consent errors gracefully and provide fallback behavior.

Test All Scenarios

Use debug settings to test all consent scenarios (required, not required, obtained) before release.

Respect User Choice

Once consent is obtained or declined, respect the user’s choice and don’t repeatedly ask.