UIDevice currentDevice identifierForVendor - 可以在iPad上进行更改 [英] UIDevice currentDevice identifierForVendor - can this change on an iPad
问题描述
我的应用使用 UIDevice currentDevice identifierForVendor
来帮助我识别设备。最近我遇到了一个我无法理解的情况。我的一个客户的iPad的 UIDevice currentDevice identifierForVendor
似乎已经改变了。这有可能吗?
My app uses UIDevice currentDevice identifierForVendor
to help me identify the device. Recently I have encountered a situation that I can't understand. A UIDevice currentDevice identifierForVendor
of an iPad of one of my clients seems to have changed. Is this ever possible?
推荐答案
当用户从设备中删除所有该供应商的应用程序并随后重新安装其中一个或多个应用程序时,该值会更改。使用Xcode安装测试版本或使用ad-hoc分发在设备上安装应用程序时,该值也会发生变化。因此,如果您的应用程序将此属性的值存储在任何位置,您应该优雅地处理标识符更改的情况。
The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
您可以使用KeyChain存储唯一的UUID(Create)通过您自己的方法或使用 API ) 。 这可能会有所帮助对你而言。
You can use KeyChain to store something unique as UUID(Create by your own method or use API). This may be helpful for you.
这篇关于UIDevice currentDevice identifierForVendor - 可以在iPad上进行更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!