1

Actually the requirement is I have to create the Unique identifier for our iOS app.

This id should be still unique in the following scenarios.

  1. App is killed and restarted again?
  2. Data is cleared from settings and restarted again?
  3. App is re-installed again?
  4. OS is updated? Ex: iOS 6 to 7
  5. Phone is factory reset?

So now there is no use of UDID which has been deprecated. I am planing to use "device macaddress + app bundleidetifier" with md5 encryption.

Is this correct approach ? If NO kindly give me you suggestions.

Tarek Hallak
  • 18,422
  • 7
  • 59
  • 68
user1249854
  • 187
  • 1
  • 8

1 Answers1

3

Apple won't let you use any identifier that might be shared between the current owner of the device and a future owner, or if the user doesn't want to share it. Because of that Apple, has introduced an "advertising identifier" that does most of the things you want (except for the factory reset):

[[ASIdentifierManager sharedManager] advertisingIdentifier]

If there were other ways to get a device ID, Apple will probably try to block them.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
  • Thanks for your response , I have one more question. Can I use APNS device token as a unique Id for life time for that particular ios device ? Thanks – user1249854 Jul 09 '13 at 13:12
  • @user1249854 None of the methods will give you a permanent token, the user will always have the option to get a new one. – Tom van der Woerdt Jul 09 '13 at 13:30