An object containing an identifier to be used for serving advertisements, and a flag indicating whether a user has limited ad tracking.


class ASIdentifierManager : NSObject


To get the advertising identifier, use the following procedure.

  1. Run the shared() method to retrieve a reference to the shared instance of the ASIdentifierManager class.

  2. Check whether advertising tracking is limited using the isAdvertisingTrackingEnabled property.

  3. Use the advertisingIdentifier property to return the advertising identifier. When ad tracking is limited, the value of the advertising identifier is 00000000-0000-0000-0000-000000000000.


Getting the Shared Manager

class func shared() -> ASIdentifierManager

The shared instance of the ASIdentifierManager class.

Getting the Advertising Identifier

var advertisingIdentifier: UUID

An alphanumeric string unique to each device, used only for serving advertisements.

var isAdvertisingTrackingEnabled: Bool

A Boolean value that indicates whether the user has limited ad tracking.

func clearAdvertisingIdentifier()

An instance that clears the current advertising identifier, forcing the creation of a new advertising identifier the next time it is needed.


Inherits From

Conforms To