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/
Tihom
Updated on July 05, 2022Comments
-
Tihom almost 2 years
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
? -
Tihom over 11 yearsDo you have any first hand knowledge of this? Have you submitted anything with the new advertising or vendor ID?
-
Ole Begemann over 11 yearsAs I said, it's just a guess.
-
wallacer over 11 yearsI think it's very unlikely that sending the IFA cause your app to be rejected. There are perfectly legitimate reasons to be sending the IFA to your own servers without being an "advertising network" ie. server to server conversion tracking
-
Alex over 11 yearsNote that this is only for
identifierForAdvertising
.identifierForVendor
stays in theUIDevice
class. -
Kevlar about 10 yearsThis is terrible advice, do this:
[[NSUUID UUID] UUIDString]
-
Basil Bourque about 10 yearsThis is the only solid answer that addresses the actual question. Thanks.
-
botbot over 9 yearsOnly my grandma is using iOS 6 now, so I'm assuming identifierForAdvertising is fair game?
-
JRG-Developer over 9 years@botbot Yeah, our minimum target is iOS 7 for pretty much all our apps... yours probably should be too... :]
-
jrc over 8 yearsNo. Did you read the descriptions of identifierForVendor/advertisingIdentifier in the question? Did you read the question?
-
Segev over 8 yearsHey malhal, have you tested if a device with an App from the appstore that uses
identifierForVendor
gets backed up on device A and restored on device B resets theidentifierForVendor
? I couldn't find any thing related to that answer in the docs.