Persistent UDID equivalent for iOS 7? [duplicate]

倾然丶 夕夏残阳落幕 提交于 2019-12-19 09:06:41

问题


First of all, I'd like to say that I'm fully aware that uniqueIdentifier has been deprecated and there are identifierForVendor & advertisingIdentifier.

My question is, if there is a way to have a fully persistent device identifier which lives through anything like reboots, app uninstalls, etc.

Currently we use identifierForVendor which is OK - but one of our product's main requirements is to allow quick login without any registration, and when people delete our app their save acts as a "local save" (even though it's hosted on our servers) - as their identifierForVendor changes.

Hope someone had better luck than me in finding an answer (or if there even is an answer :P)

Thanks


回答1:


The best you can do is create a guid yourself and store it in the keychain for your app. That will survive uninstalls and reboots, but not system wipes. If the user logs in to some cloud service that you can create an association with on your server, e.g. Game Center or Facebook, then that id is generally stable across system wipes and you could do a lookup there. Be careful not to violate those services TOS, however.



来源:https://stackoverflow.com/questions/21095686/persistent-udid-equivalent-for-ios-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!