UIDevice uniqueIdentifier deprecated - What to do now?

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

    You may want to consider using OpenUDID which is a drop-in replacement for the deprecated UDID.

    Basically, to match the UDID, the following features are required:

    1. unique or sufficiently unique (a low probability collision is probably very acceptable)
    2. persistence across reboots, restores, uninstalls
    3. available across apps of different vendors (useful to acquire users via CPI networks) -

    OpenUDID fulfills the above and even has a built-in Opt-Out mechanism for later consideration.

    Check http://OpenUDID.org it points to the corresponding GitHub. Hope this helps!

    As a side note, I would shy away from any MAC address alternative. While the MAC address appears like a tempting and universal solution, be sure that this low hanging fruit is poisoned. The MAC address is very sensitive, and Apple may very well deprecate access to this one before you can even say "SUBMIT THIS APP"... the MAC network address is used to authenticate certain devices on private lans (WLANs) or other virtual private networks (VPNs). .. it's even more sensitive than the former UDID!

提交回复
热议问题