iOS 6 Adds identifierForVendor To Uniquely Identify A Device – UDID Alternative

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.

  1. For some reason I always recieve the same value back when Im in the same app, but when I test another app I get a different value.. isnt it supposed to gibe me the same value back?

    • Yes, it seems you should be getting the same value. From the Apple docs:

      The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.

      • Yeah Ive read that too..
        Thats why I fint it strange.. Did you get those values you showed only in the log or did you actually test your code on a device? If so, maybe we could compare codes?

        • The output was from the console (in Xcode) when running the app on a device. I don’t think I have the original project anymore, however, the code should be the same as in the post.

  2. Yeah the thing is I´ve implemented in my project so that the UUID appends to a UITextField, so I had to add some more code than what is shown on the site…

    I also tried to do as you had done, two different apps running on a device showing the output only in the log, still different UUIDs… Could it be a bug?

    • And the code signing values are the same (that is, the same “vendor” as Apple mentions)? I would try the iOS developer forums.

Comments are closed.