iOS 6 Adds identifierForVendor To Uniquely Identify A Device – UDID Alternative
October 22, 2012
With iOS 6 Apple has introduced a new property in the UIDevice family, similar in nature to the deprecated UDID. identifierForVendor is an alphanumeric string that will uniquely identify a device to the developer.
All applications on the device by the same developer will return the same alphanumeric string.
One important note, if you delete all your apps on a device the next time you install one or more of your apps, there will be a new value created.
Here is how to get the current identifierForVendor value:
NSLog(@"Identifer: %@", [[UIDevice currentDevice] identifierForVendor]);
As a test run I installed two applications, here are the values returned (which I truncated):
identifer 1: <__NSConcreteUUID 0x1f0974d0> 9C7F1DB0-193A-40A8…
identifer 2: <__NSConcreteUUID 0x1dd4dd30> 9C7F1DB0-193A-40A8…
The same test applications after removing both apps and reinstalling:
identifer 1: <__NSConcreteUUID 0x1f082e40> BA29542D-D1E3-49AF…
identifer 2: <__NSConcreteUUID 0x1dd608a0> BA29542D-D1E3-49AF…
Although not a direct replacement for UDID, this may be a good alternative depending on your needs.