Skip to content

SUDOPPrivacyConfig ​

An optional advertising privacy configuration for OP initialization. It only carries states confirmed by the host, does not display consent dialogs, and does not replace a CMP.

Creation ​

SUDOPPrivacyConfig has no all-argument initializer. Create the object and assign only the fields confirmed by the host; unassigned fields keep the default Unset value and are not applied to the ad SDK.

objectivec
SUDOPPrivacyConfig *privacyConfig = [[SUDOPPrivacyConfig alloc] init];
privacyConfig.gdprConsentStatus = kSUDOPGdprConsentStatusGranted;

Properties and Enums ​

All four properties are writable assign enum values, each defaulting to Unset (-1, unset).

PropertyEnum typeValues (prefix k and append the suffix to the enum type for the full name)
gdprConsentStatusSUDOPGdprConsentStatusUnset (-1), NotApplicable (0), Granted (1), Denied (2, denied or withdrawn)
doNotSellStatusSUDOPDoNotSellStatusUnset (-1), NotApplicable (0), OptedOut (1, sale or sharing), NotOptedOut (2)
lgpdConsentStatusSUDOPLgpdConsentStatusUnset (-1), NotApplicable (0), Granted (1), Denied (2, denied or withdrawn)
ageRestrictedTreatmentSUDOPAgeRestrictedTreatmentUnset (-1), Unspecified (0), Child (1), Teen (2)

The default Unset does not actively set the corresponding state and means neither consent nor withdrawal, nor does it guarantee clearing a third-party SDK's existing state. NotApplicable in the first three fields does not set the corresponding state. Age treatment Unspecified explicitly sets age treatment to unspecified and differs from Unset.

Example ​

The values below illustrate syntax only. Use states actually confirmed by the host:

objectivec
// Use the host's confirmed choices; these values only illustrate syntax.
SUDOPPrivacyConfig *privacyConfig = [[SUDOPPrivacyConfig alloc] init];
// Assign only the states confirmed by the host; unassigned fields keep the
// default Unset value and are not applied to the ad SDK.
// Assign enums directly; no @() wrapping needed.
// Unset does not actively set a state; it is not denial, withdrawal, or a third-party reset.
// GDPR: Granted = granted; Denied = denied/withdrawn; NotApplicable = not applicable; the state is not set.
privacyConfig.gdprConsentStatus = kSUDOPGdprConsentStatusGranted;
// Sale/sharing: OptedOut = opted out; NotOptedOut = not opted out; NotApplicable = not applicable; the state is not set.
privacyConfig.doNotSellStatus = kSUDOPDoNotSellStatusOptedOut;
// Brazil LGPD: Granted/Denied/NotApplicable. Confirm separately from GDPR.
privacyConfig.lgpdConsentStatus = kSUDOPLgpdConsentStatusNotApplicable;
// Age: Child = child; Teen = teen; Unspecified explicitly sets unspecified treatment, unlike Unset.
privacyConfig.ageRestrictedTreatment = kSUDOPAgeRestrictedTreatmentTeen;

Pass it through SUDOPSDKConfiguration.privacyConfig during initialization.