iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising? iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising? ios ios

iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising?


Important Note:

Apple just released iOS 6.0 and the NDA has been lifted.

For developers who preemptively included code that referenced

[[UIDevice currentDevice] identifierForAdvertising]

this method has NOT been included on iOS 6. If you use the above method, your app will (most likely) crash and be rejected!

Instead, Apple has created a new class ASIdentifierManager , which includes the method advertisingIdentifier. Here's the apple docs on it:


Users can limit the use of ad tracking on their phone. See this article on the opt-out mechanism under Settings > General > About > Advertising.

The new ASIdentifierManager class has a property advertisingTrackingEnabled, which returns true or false depending if the user has limited ad tracking. Even though the device's advertising identifier is returned by the advertisingIdentifier property regardless of opt-out, you aren't supposed to use the identifier if the user has opted-out.

So the advantage of identifierForVendor is that you'll always have access to and the right to use this id for the phone regardless of user's opt-in or opt-out for advertising tracking.


I suspect that Apple will simply reject your app if you use identifierForAdvertising for anything that is not advertising-related (i.e., if you send the identifierForAdvertising to your own servers even though you're not an advertising network or if you send the identifierForAdvertising in the same request with other data that could potentially identify an individual).

If my suspicion is correct, the advantage of identifierForVendor over identifierForAdvertising is that it won't get your app rejected.