UIDevice uniqueIdentifier deprecated - What to do now?

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

    check this out,

    we can use Keychain instead of NSUserDefaults class, to store UUID created by CFUUIDCreate.

    with this way we could avoid for UUID recreation with reinstallation, and obtain always same UUID for same application even user uninstall and reinstall again.

    UUID will recreated just when device reset by user.

    I tried this method with SFHFKeychainUtils and it's works like a charm.

提交回复
热议问题