Multi-Profile
OneTrust SDK Public Methods for Multi Profile Consent
Existing
Check currently active profile
Represents the current active profile identifier (data subject identifier).
OTPublishersHeadlessSDK.shared.currentActiveProfile
Delete a profile
Deletes the profile and its associated storage from OT SDK.
OTPublishersHeadlessSDK.shared.deleteProfile(\_:, completion:)
Parameters:
profileID: The identifier of the profile to be deleted.completion: The completion block that will be triggered after deleting a profile.
Note: Please make sure that startSDK call is complete before calling this API.
Rename a profile (moving from one DSID to another)
Renames the profile storage from the current profile identifier to the new one.
Parameters:
currentProfileID: The current identifier of the profile. If no profile identifier is passed, current profile identifier will be updated to new identifier.newProfileID:The new identifier to which the profile ID should be changed to.completion: Completion block that will be triggered once the rename operation is complete. The boolean status determines if the renaming was successful or not.
OTPublishersHeadlessSDK.shared.renameProfile(from:, to:, withIdentifierType:, completion:)Note: Please make sure that startSDK call is complete before calling this API.
Switching between multiple profiles
Switches the profile based on the identifier passed.
Parameters:
profileID: The identifier of the profile to be loaded.completion: The completion block that will be triggered at the end of the profile switch operation.
OTPublishersHeadlessSDK.shared.switchProfile(to: String, completion:)Note: Please make sure that startSDK call is complete before calling this API. Additionally if data is missing, SDK will throw an error.
Updated 10 months ago
Did this page help you?
