Apple is changing their privacy settings for iOS6 and deprecating device UUIDs (UDIDs). According to a WWDC presentation and the docs there are two replacements for the UDIDs, both in the UIDevice
class:
-identifierForVendor
-identifierForAdvertising
It seems to me that -identifierForVendor
is inferior to -identifierForAdvertising
since it would get reset on last uninstall of an app from a vendor and by "erase all contents & settings".
What advantages does -identifierForVendor
have over -identifierForAdvertising
?
An alphanumeric string that uniquely identifies a device to the app's vendor.
The identifierForVendor is an unique identifier that stays the same for every app of a single vendor on a single device, unless all of the vendor's apps are deleted from this device. See Apple's documentation about when this UUID changes.
UDIDs are used to associate a device to an iOS developer account so that developers can install and test their apps before releasing them. Connecting the UDID to a developer account also allows that device to install beta releases of iOS for testing.
Go to "Sales and Trends", then choose "Reports" from the drop-down menu in the top left. On the next screen, there'll be a drop-down menu for "Vendor". Your name and ID will be shown there.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With