4

I'm looking for a way to retrieve the UDID on devices running iOS 6+ (Enterprise deployment only - no app store limitations).

Calling the (now private) method uniqueIdentifier returns the 'vendorIdentifier' starting with 'FFFFFFF'. Unfortunately thats not what I want.

Any ideas? Is there another private method or something?

Thanks in advance.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user3086582
  • 41
  • 1
  • 3

3 Answers3

2

I recommend you reading this article. To sum up:

  • The previously deprecated uniqueIdentifier now works like vendorIdentifier on iOS 7+, so it's no longer usable even for Enterprise Apps
  • OpenUDID cannot be shared between Applications on iOS 7+ and now can change. It's still usable but no longer recommended.
  • The vendorIdentifier hasn't changed, but it's not recommended for Enterprise Apps because it can change when updating the App.
  • The new advertisingIdentifier API is the way to go for new Apps. It's the same for all Apps and should not change frequently, but the user can reset it in the settings page.

Edit: Website udid.io obtains the real Device UDID instead of the obfuscated one if you need it for anything outside your App. If you need the UDID from within the App, see my answer above.

redent84
  • 18,901
  • 4
  • 62
  • 85
  • Well, I know OpenUDID. The problem is though that our (legacy) backend is returning data based on UDIDs. I was looking for a solution which doesn't involve refactoring server side applications. People just had to copy & paste their UDID from iTunes and they were ready to go. – user3086582 Dec 10 '13 at 11:52
  • Sorry to hear that, but on iOS 7+ there's no way to access the UDID shown in iTunes from code anymore. – redent84 Dec 10 '13 at 14:22
1

You can get a Unique UDID via this method using private api. Follow this link Look for the code in accepted answer.

Community
  • 1
  • 1
TorukMakto
  • 2,066
  • 2
  • 24
  • 38
  • Thanks for the reply. Unfortunately, I only get **some** Unique id - not the particular UDID shown in iTunes. – user3086582 Dec 10 '13 at 14:17
  • Well thats strange - I will relook into code tomo and let you know because I thought I was getting the same UDID that we see in iTunes. – TorukMakto Dec 10 '13 at 14:19
0

Sorry, but Apple warned it would be deprecated and it has been. I've had the same headache myself.

I can't help you identify the device in the same way Apple do, but you can always generate an unique UUID on app launch and stash that away in KeyChain. It won't be perfect, but it will persist between installations and will be unique to the device. As far as I know, that's the current solution

davbryn
  • 7,156
  • 2
  • 24
  • 47