Experience Cloud ID Service Methods

Here are the Experience Cloud ID service methods that are provided by the iOS library.

The SDK currently supports multiple Adobe Experience Cloud Solutions, including Analytics, Target, Audience Manager, and the Experience Cloud Visitor ID service.

Methods are prefixed according to the solution, and Experience Cloudr ID methods are prefixed with visitor. For more information, see Enabling the Experience Cloud ID.

Method Description
+ (nullable NSURL *) visitorAppendToURL: (nullable NSURL *) url;

Appends Adobe visitor data to a URL string for use with the Adobe JavaScript library. To use this method, you must have Mobile SDK 4.12+. For more information, see Append Visitor ID Helper Function).

Important: This method can cause a blocking network call. Do not call this on time-sensitive threads.
  • Input: URL<NSURL>

    A required URL string that the visitor information will be appended to.

  • Output: URL<NSURL>

    String with the visitor info appended.

Example:

NSURL *url = [NSURL URLWithString:@"http://www.example.com"]; 
NSURL *decoratedURL = [ADBMobile visitorAppendToURL: url]; 
[[UIApplication sharedApplication] openURL: decoratedURL]; 
visitorMarketingCloudID

Retrieves the Experience Cloud ID from the ID service.

Syntax:

+ (NSString *) visitorMarketingCloudID;

Example:

NSString *mcid = [ADBMobile visitorMarketingCloudID];
Important: This method can cause a blocking network call and should not be called from a UI thread.

visitorSyncIdentifiers:

With the Experience Cloud ID, you can set additional customer IDs that can be associated with each visitor. The Visitor API accepts multiple Customer IDs for the same visitor, with a customer type identifier to separate the scope of the different customer IDs. This method corresponds to setCustomerIDs in the JavaScript library.

Syntax:

+ (void) visitorSyncIdentifiers:(NSDictionary *)identifiers;

Example:

[ADBMobile visitorSyncIdentifiers:@{@"idType":@"idValue"}];

visitorSyncIdentifiers:authenticationState:

Synchronizes the provided identifiers to the ID service. Pass in the authState as one of the following values:

  • ADBMobileVisitorAuthenticationStateUnknown
  • ADBMobileVisitorAuthenticationStateAuthenticated
  • ADBMobileVisitorAuthenticationStateLoggedOut

Syntax:

+ (void) visitorSyncIdentifiers:(nullable NSDictionary *)identifiers authenticationState:(ADBMobileVisitorAuthenticationState)authState;

Example:

[ADBMobile visitorSyncIdentifiers:@{@"myIdType":@"valueForUser"} authenticationState:ADBMobileVisitorAuthenticationStateAuthenticated];

visitorSyncIdentifierWithType:identifier:authenticationState:

Synchronizes the provided identifier type and value to the ID service. Pass in the authState as one of the following values:

  • ADBMobileVisitorAuthenticationStateUnknown
  • ADBMobileVisitorAuthenticationStateAuthenticated
  • ADBMobileVisitorAuthenticationStateLoggedOut

Syntax:

+ (void) visitorSyncIdentifierWithType:(nullable NSString *)identifierType identifier:(nullable NSString *)identifier authenticationState:(ADBMobileVisitorAuthenticationState)authState;

Example:

[ADBMobile visitorSyncIdentifierWithType:@"myIdType" identifier:@"valueForUser" authenticationState:ADBMobileVisitorAuthenticationStateLoggedOut];

visitorGetIDs

Retrieves an array of read-only ADBVisitorID objects.

Syntax:

+ (nullable NSArray *) visitorGetIDs;

Example:

NSArray *myVisitorIDs = [ADBMobile visitorGetIDs];

ADBVisitorID interface

Public Methods:

- (nullable NSString *) idType;
- (nullable NSString *) identifier;
- (ADBMobileVisitorAuthenticationState) authenticationState;

ADBMobileVisitorAuthenticationState enum

ADBMobileVisitorAuthenticationStateUnknown,
ADBMobileVisitorAuthenticationStateAuthenticated,
ADBMobileVisitorAuthenticationStateLoggedOut