问题
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?
回答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
回答2:
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.
来源:https://stackoverflow.com/questions/15858310/advertising-identifier-for-devices-lower-than-ios-6-0