UIDevice uniqueIdentifier deprecated - What to do now?

后端 未结 30 2130
日久生厌
日久生厌 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:46

    It looks like for iOS 6, Apple is recommending you use the NSUUID class.

    From the message now in the UIDevice docs for uniqueIdentifier property:

    Deprecated in iOS 5.0. Use the identifierForVendor property of this class or the advertisingIdentifier property of the ASIdentifierManager class instead, as appropriate, or use the UUID method of the NSUUID class to create a UUID and write it to the user defaults database.

提交回复
热议问题