objective C iOS Device ID in iOS7

烈酒焚心 提交于 2019-12-02 01:21:49

问题


I want to ask that whether objective C can obtain a unique device ID of the Device. "uniqueIdentifier" is deprecated in iOS7 and I try to use "identifierForVendor" but it gives me a different ID after the app is re-installed. I want to find a stable device ID after the app is re-install, and even the iOS is changed. In the early version of iOS, we can use MAC address to achieve such goal. But now, in iOS7, the MAC address is no longer available. How can i find a stable device ID of the iOS device in iOS7?

Maybe using Keychain to store the "identifierForVendor" value is a good approach. But will it still be the same after the whole iOS is re-installed?


回答1:


iOS does not allow you to identify a device universally anymore. That is the basic idea behind removing access to UDID and Mac address. You need to change the design of your application to adapt to these new circumstances.




回答2:


in my case i used keyChain to save first generated UUID then i used it as unique device id it still persistent even if after uninstalling the app



来源:https://stackoverflow.com/questions/19329765/objective-c-ios-device-id-in-ios7

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