Skip to content

iOS SDK - Privacy signals

Request ATT authorization

On iOS 14+, request App Tracking Transparency authorization before initializing the SDK. Many ad networks require the IDFA to maximize fill rates.

import AppTrackingTransparency

ATTrackingManager.requestTrackingAuthorization { status in
    DispatchQueue.main.async {
        self.initializeA11()
    }
}

Set privacy signals and initialize

Set privacy signals before calling initialize() to ensure ad networks receive the correct user status from the first ad request.

import A11Mediation

func initializeA11() {
    // Privacy signals — set before initialize
    A11.privacy.setDoNotSell(false)
    A11.privacy.setIsChildDirected(false)

    // GDPR — per-vendor consent
    A11.privacy.setUserConsent(UserConsent(
        jurisdiction: .gdpr,
        consents: [
            .googleAdmob: true,
            .metaAudienceNetwork: false
            // ... set true/false per vendor based on your collected consent
        ]
    ))

    // Initialize — call once
    A11.shared.initialize(appKey: "YOUR_APP_KEY", hostURLs: ["https://your-host-url.com"])
}

Timing

  • setIsChildDirected — must be called before initialize() and cannot be changed after. The SDK ignores it if called after initialization.
  • setUserConsent and setDoNotSell — should be set before initialize(), but can be updated later in the session if the user changes their preferences in the app.

How privacy signals propagate

The SDK forwards each signal to the corresponding API of every integrated ad network that supports it. If a signal is not provided, nothing is set and each ad network falls back to its own default behaviour.

Ad networks that are IAB TCF-certified read the TCF string directly from UserDefaults. The publisher is responsible for ensuring a valid TCF string is written here — either via certified CMP or directly when managing consent without one. If both TCF string and setUserConsent are set for a specific ad network, it is up to each ad network to determine which one takes precedence.

When isChildDirected is set to true, A11 Mediation automatically suppresses ad requests to networks that serve interest-based advertising only — no additional publisher configuration is required.

Publisher action required for certain networks

Some integrated networks do not expose a privacy API or do not allow deterministic signal mapping. A11 Mediation does not propagate privacy signals to these networks. Additionally, when AdMob or Google Ad Manager (GAM) mediation is active, publishers must configure privacy on AdMob/GAM's own mediated SDKs directly.

Publishers must take these steps before calling A11.shared.initialize(), in accordance with the network's technical documentation and any applicable contractual obligations.

See the full Network privacy reference for the required action per network. If you are unsure which steps apply to your integration, contact your Aurion11 representative.

Passing consent without a CMP

If you collect consent outside a standard CMP — for example, through a custom consent screen or a server-side record — pass it manually via setUserConsent(_:) before calling initialize():

A11.privacy.setUserConsent(UserConsent(
    jurisdiction: .gdpr,
    consents: [
        .googleAdmob: true,
        .metaAudienceNetwork: false
        // ... set true/false per vendor based on your collected consent
    ]
))

Next steps

Initialize the SDK, then integrate your ad units.