同一应用的 iOS UUID 不同取决于是否通过 xcode 或 testflight 安装

标签 ios swift uuid

我发现我获得的 UUID 是不同的,具体取决于应用程序是直接由 xcode 安装(我在开发期间安装)还是通过 testflight 安装。

let uuidstring = UIDevice.current.identifierForVendor!.uuidString

是否有可能在两种情况下获得相同的 UUID?

理想情况下,UUID 是真正唯一的设备 标识符,并且在删除和添加应用程序时不会更改,这似乎会更改当前的 UUID。

最佳答案

作为documentation

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them.

这就是为什么重新安装会改变 App 的 UUID 的原因。

关于同一应用的 iOS UUID 不同取决于是否通过 xcode 或 testflight 安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40753246/

相关文章:

ios - 当我尝试在 Swift 中以编程方式截取我的应用程序的屏幕截图时,为什么屏幕截图只显示白色?

mysql - 无法选择 uuid = (number) 的行

ios - 卡在为 Bluemix 推送创建 .p12 推送证书文件

ios - iOS-应用程式内购买和Beta测试

ios - 在关闭中找不到成员

mysql - 我如何在mysql中通过uuid从表中选择

go - 如何以特定模式生成 UUID

ios - 在 swift 4/Xcode 10 中第二次启动 App 时跳过初始 View Controller

ios - Apple MDM 推送错误,但仅限于某些 iOS 设备

macos - 如何在 Swift 中删除一个 View 的所有 subview ?