How to identify iOS device uniquely instead of using UUID and UDID [duplicate]

*爱你&永不变心* 提交于 2019-11-29 02:00:42

Apple has done away with the approach of UDIDs and will reject apps that use the same for unique device identification. Source: TNW

What you are looking for is Vendor ID

mgyky

I'm using this library for my projects, and it's working like a charm, please try :

https://github.com/blackpixel/BPXLUUIDHandler

easy to use :

Import BPXLUUIDHandler.h Retrieve the UUID with

[BPXLUUIDHandler UUID]

Thats all...

Here is some info from project's github page :

As of iOS 5, Apple has deprecated the device unique identifier api and hasn’t provided a friendly Obj-C replacement, instead recommending CFUUIDCreate and NSUserDefaults.

CFUUIDCreate isn’t very complicated and neither is NSUserDefaults, but this solution fails in a few different ways:

  • It’s not a quick one-shot call to get the UUID; you have to write your own wrapper to make it friendly
  • It doesn’t persist; deleting the app blows away the UUID (can be persisted if stored in the keychain though)
  • There’s no way to share it between apps
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!