我发现我获得的 UUID 是不同的,具体取决于应用程序是直接由 xcode 安装(我在开发期间安装)还是通过 testflight 安装。
let uuidstring = UIDevice.current.identifierForVendor!.uuidString
是否有可能在两种情况下获得相同的 UUID?
理想情况下,UUID 是真正唯一的设备 标识符,并且在删除和添加应用程序时不会更改,这似乎会更改当前的 UUID。
最佳答案
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/