iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising?
Solution 1:
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:
Solution 2:
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.
Solution 3:
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.
Solution 4:
They are two different ids meant for two different purposes.
I would think that the identifierForVendor would be the one to use to do things that require the app linking to a specific user / device such as provide push notifications and updating the user's app data serverside (like their score or whatever other data is being stored for them).
The identifierForAdvertising should be used for things such as targeted advertising and also to check the effectiveness of a particular ad campaign (check to see which devices installed apps due to a particular ad).
Solution 5:
Use the VendorID. This is a very enlightening article http://www.doubleencore.com/2013/04/unique-identifiers/