Retrieving UDID via private API

狂风中的少年 提交于 2019-12-01 06:54:18

I recommend you reading this article. To sum up:

  • The previously deprecated uniqueIdentifier now works like vendorIdentifier on iOS 7+, so it's no longer usable even for Enterprise Apps
  • OpenUDID cannot be shared between Applications on iOS 7+ and now can change. It's still usable but no longer recommended.
  • The vendorIdentifier hasn't changed, but it's not recommended for Enterprise Apps because it can change when updating the App.
  • The new advertisingIdentifier API is the way to go for new Apps. It's the same for all Apps and should not change frequently, but the user can reset it in the settings page.

Edit: Website udid.io obtains the real Device UDID instead of the obfuscated one if you need it for anything outside your App. If you need the UDID from within the App, see my answer above.

Jailbroken

You can get a Unique UDID via this method using private api. Follow this link Look for the code in accepted answer.

Sorry, but Apple warned it would be deprecated and it has been. I've had the same headache myself.

I can't help you identify the device in the same way Apple do, but you can always generate an unique UUID on app launch and stash that away in KeyChain. It won't be perfect, but it will persist between installations and will be unique to the device. As far as I know, that's the current solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!