ASIdentifierManager Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AdSupport.framework |
| Availability | Available in iOS 6.0 and later. |
| Declared in | ASIdentifierManager.h |
Overview
The ASIdentifierManager class provides apps with access to an identifier that can be used only for serving advertisements, as well as a flag which indicates whether a user has limited ad tracking.
This class is expected to be used by developers who are implementing a system for serving ads. These organizations typically provide app developers with the code that interacts with this class. App developers may need to link against the Ad Support framework to use that code, but they should not need to interact with the ASIdentifierManager class directly.
To get the advertising identifier:
Get a reference to the shared instance of this class using the
sharedManagermethod.Check whether advertising tracking is limited using the
advertisingTrackingEnabledproperty.If the user has limited ad tracking, use the advertising identifier only for the following purposes: frequency capping, conversion events, estimating the number of unique users, security and fraud detection, and debugging.
Get the advertising identifier using the
advertisingIdentifierproperty.
Tasks
Getting the Advertising Identifier
-
advertisingIdentifierproperty -
advertisingTrackingEnabledproperty -
+ sharedManager
Properties
advertisingIdentifier
An alphanumeric string unique to each device, used only for serving advertisements. (read-only)
Discussion
Unlike the identifierForVendor property of the UIDevice, the same value is returned to all vendors. This identifier may change—for example, if the user erases the device—so you should not cache it.
The value of this property may be nil if the app is running in the background, before the user has unlocked the device the first time after the device has been restarted. If the value is nil, wait and get the value again later.
Availability
- Available in iOS 6.0 and later.
Declared In
ASIdentifierManager.hadvertisingTrackingEnabled
A Boolean value that indicates whether the user has limited ad tracking. (read-only)
Discussion
Check the value of this property before performing any advertising tracking. If the value is NO, use the advertising identifier only for the following purposes: frequency capping, conversion events, estimating the number of unique users, security and fraud detection, and debugging.
Availability
- Available in iOS 6.0 and later.
Declared In
ASIdentifierManager.hClass Methods
sharedManager
Returns the shared instance of the ASIdentifierManager class.
Return Value
The shared instance of the ASIdentifierManager class.
Availability
- Available in iOS 6.0 and later.
Declared In
ASIdentifierManager.h© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)