UAAssociatedIdentifiers

@interface UAAssociatedIdentifiers : NSObject

Defines analytics identifiers to be associated with the device.

  • The advertising ID.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *advertisingID;

    Swift

    var advertisingID: String? { get set }
  • The application’s vendor ID.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *vendorID;

    Swift

    var vendorID: String? { get set }
  • Indicates whether the user has limited ad tracking.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL advertisingTrackingEnabled;

    Swift

    var advertisingTrackingEnabled: Bool { get set }
  • A map of all the associated identifiers.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDictionary *_Nonnull allIDs;

    Swift

    var allIDs: [AnyHashable : Any] { get }
  • Factory method to create an empty identifiers object.

    Declaration

    Objective-C

    + (nonnull instancetype)identifiers;

    Return Value

    The created associated identifiers.

  • Factory method to create an associated identifiers instance with a dictionary of custom identifiers (containing strings only).

    Declaration

    Objective-C

    + (nonnull instancetype)identifiersWithDictionary:
        (nonnull NSDictionary<NSString *, NSString *> *)identifiers;

    Swift

    convenience init(dictionary identifiers: [String : String])

    Return Value

    The created associated identifiers.

  • Sets an identifier mapping.

    Declaration

    Objective-C

    - (void)setIdentifier:(nullable NSString *)identifier
                   forKey:(nonnull NSString *)key;

    Swift

    func setIdentifier(_ identifier: String?, forKey key: String)

    Parameters

    identifier

    The value of the identifier, or nil to remove the identifier. @parm key The key for the identifier