1

It seems that we cannot use [UIDevice currentDevice].uniqueIdentifier anymore. The Advertising Identifier is supposed to be used. But the Advertising Identifier is available only since iOS 6.0.

How can I uniquely identify a device lower than iOS 6.0?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
waterforest
  • 154
  • 1
  • 8

2 Answers2

1

Yes, the unique identifier is deprecated. For this i have a solution.Please go through the below link and i believe this is the replacement of apple UDID.

https://github.com/ylechelle/OpenUDID#usage

http://www.secureudid.org

Ganesh
  • 524
  • 1
  • 4
  • 16
0

On the first time the app is launched, create a UUID with CFUUIDCreate, convert it to a string with CFUUIDCreateString, and then save it to a file in the app's cache directory. On subsequent launches of the app, use the UUID saved to the file rather than creating a new on.

kamprath
  • 2,220
  • 1
  • 23
  • 28
  • NSUserDefaults might be simpler to use for saving a string than writing it out to a file and reading it back. – zadr Apr 07 '13 at 05:43
  • If the user have re-installed the app, is this string still unique? I wanner help the user recover his data saved before, score, coins, things already paid, etc. – waterforest Apr 07 '13 at 06:09
  • I'm sorry for that the user's data were saved on the server with [UIDevice currentDevice].uniqueIdentifier before. The user may not be able to get his played data back via [UIDevice currentDevice].uniqueIdentifier. – waterforest Apr 07 '13 at 06:12