IfGetPrivacyOptionsRequirementStatus()is kPrivacyOptionsRequirementStatusRequired, presents a privacy options form from the provided FormParent, which is defined as an Activity on Android and a UIViewController on iOS.
Loads a consent form and immediately presents it using the given FormParent, if ConsentStatus is kConsentStatusRequired.
The FormParent is defined as an Activity on Android and a UIViewController on iOS. TheFuturewill be completed successfully after the user selects an option (and the form is dismissed), or if the form is not required. TheFuturewill be completed with an error if the form fails to load or show.
Must be called in every app session before checking the user’s consent status or loading a consent form. After calling this method,GetConsentStatus()andCanRequestAds()will be updated immediately to hold the consent state from the previous app session, if one exists.GetConsentStatus()andCanRequestAds()may be updated again immediately before the returned future is completed.
IfGetPrivacyOptionsRequirementStatus()is kPrivacyOptionsRequirementStatusRequired, presents a privacy options form from the provided FormParent, which is defined as an Activity on Android and a UIViewController on iOS.
This method should only be called in response to a user input to request a privacy options form to be shown.
The future completes when the user selects an option and dismisses the form or is completed immediately with an error code if no form is presented. The privacy options form is preloaded by the SDK automatically when a form becomes available. If no form has been preloaded, the SDK will try to load one asynchronously.
Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if there are Android dependencies missing.
Returns
A pointer to theConsentInfoinstance if UMP was successfully initialized, nullptr otherwise. Each call toGetInstance()will return the same pointer; when you are finished using the SDK, you can delete the pointer and the UMP SDK will shut down.
Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency on Android if there are Android dependencies missing.
Returns
A pointer to theConsentInfoinstance if UMP was successfully initialized, nullptr otherwise. Each call toGetInstance()will return the same pointer; when you are finished using the SDK, you can delete the pointer and the UMP SDK will shut down.
Optional: If provided, write the basic init result here. kInitResultSuccess if initialization succeeded, or kInitResultFailedMissingDependency if a dependency is missing. On iOS, this will always return kInitResultSuccess, as missing dependencies would have caused a linker error at build time.
Returns
A pointer to theConsentInfoinstance. Each call toGetInstance()will return the same pointer; when you are finished using the SDK, you can delete the pointer, and the UMP SDK will shut down.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe User Messaging Platform (UMP) SDK helps manage user privacy and consent in mobile apps.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eConsentInfo\u003c/code\u003e class provides methods for obtaining and managing user consent, including loading and displaying consent forms.\u003c/p\u003e\n"],["\u003cp\u003eBefore using UMP features, initialize the SDK using \u003ccode\u003eConsentInfo::GetInstance()\u003c/code\u003e and call \u003ccode\u003eRequestConsentInfoUpdate()\u003c/code\u003e to retrieve the user's consent status.\u003c/p\u003e\n"],["\u003cp\u003eYou can present the consent form if required using \u003ccode\u003eLoadAndShowConsentFormIfRequired()\u003c/code\u003e or load it separately with \u003ccode\u003eLoadConsentForm()\u003c/code\u003e and then display it using \u003ccode\u003eShowConsentForm()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCanRequestAds()\u003c/code\u003e indicates whether the app has the necessary user consent to request ads.\u003c/p\u003e\n"]]],["The `ConsentInfo` class from the User Messaging Platform (UMP) SDK manages user consent in mobile apps. Key actions include: initializing the SDK, requesting consent information updates via `RequestConsentInfoUpdate`, and checking consent status using `GetConsentStatus`. The class can load and display consent forms using `LoadConsentForm` and `ShowConsentForm` or `LoadAndShowConsentFormIfRequired`, which presents a form if consent is required. It can also check and display privacy option form with `GetPrivacyOptionsRequirementStatus` and `ShowPrivacyOptionsForm`. Additionally, the `CanRequestAds` method verifies if ad requests are allowed. `Reset` clears stored consent data.\n"],null,[]]