It has just come to light that the UIDevice uniqueIdentifier property is deprecated in iOS5
and above. No alternative method or property appears to be available or forthcoming.
Many of our existing apps are tightly dependent on this property for uniquely identifying a particular device. Can anyone suggest any ideas how we might handle this problem going forward?
The suggestion from the documentation is...
Special Considerations
Do not use the uniqueIdentifier property. To create a unique identifier specific to your app, you can call the
CFUUIDCreate
function to create aUUID
, and write it to the defaults database using theNSUserDefaults
class.
However this value won't be the same if a user uninstalls and re-installs the app.
转载于:https://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now