Prompts

OneTrust SDK Public Methods for Apple Tracking Transparency(ATT) and Age Gate Prompts

Existing

showConsentUI

Displays prompt UI configured in OneTrust Template associated with the application ID. Shows the view for getting user consent for the passed in permission type.

Parameter:

  • permissionType: The application permission type.
  • presenter: The controller on which the permission consent should be presented.
  • completion: This block will be triggered once the consent action is taken by the user and the consent view is closed.
OTPublishersHeadlessSDK.shared.showConsentUI(for:, from:, completion:)

Notes:Please make sure that the OT data is downloaded via startSDK API prior to calling this method.The UI would only show up if its configured at the template level else we will see an error logged by OneTrust SDK indicating the same.

Checking if consent for the permission prompt has changed and logging consent with OneTrust

Determines if the passed in permissionType consent status has changed and if it did, updates the new value to Consent Logging API.

CustomConfigurator.checkAndLogConsent(for:)

Parameter:

  • permissionType: The permission type for which consent needs to be logged.

Notes:Please make sure that the OT data is downloaded via startSDK API prior to calling this method.Consent logging will only be performed if the passed in permission prompt is configured at the template.
Currently we only support logging consent for App Tracking Transparency.