Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising?

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

  • ID that is identical between apps from the same developer.
  • Erased with removal of the last app for that Team ID.
  • Backed up.

-identifierForAdvertising

  • Unique to the device.
  • Available to all applications; used for advertising — iAd has converted from UDID for iOS 6 and later.
  • Reset with "Erase All Content & Settings".
  • Backed up.

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?

like image 854
Tihom Avatar asked Aug 06 '12 21:08

Tihom


People also ask

What is identifierForVendor iOS?

An alphanumeric string that uniquely identifies a device to the app's vendor.

Is identifierForVendor unique?

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.

Why do you need UDID?

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.

How do I find the vendor ID on my iPhone?

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.


2 Answers

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:

like image 131
JRG-Developer Avatar answered Sep 18 '22 19:09

JRG-Developer


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.

like image 44
Mr. T Avatar answered Sep 19 '22 19:09

Mr. T