UIDevice uniqueIdentifier deprecated - What to do now?

后端 未结 30 2125
日久生厌
日久生厌 2020-11-21 06:07

It has just come to light that the UIDevice uniqueIdentifier property is deprecated in iOS 5 and unavailable in iOS 7 and above. No alternative method or pr

30条回答
  •  你的背包
    2020-11-21 06:40

    Perhaps you can use:

    [UIDevice currentDevice].identifierForVendor.UUIDString
    

    Apple's documentation describes identifierForVender as follows:

    The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.

提交回复
热议问题