unable to have a unique ios device, as advertising identifier returned as 00000000-0000-0000-0000-000000000000 after ios 10

时光怂恿深爱的人放手 提交于 2019-12-25 13:23:30

问题


I used to use apples advertising identifier as the Unique device ID key, to keep a track of users device, But with upgrade to iOS 10 and limit ad tracking returning IDFA as 00000000-0000-0000-0000-000000000000, I am unable to maintain the device records, Is there any other replacement which I can use for device id to be stored unique to a user as he signs up.


回答1:


As per my understanding of your requirement your best option is: Identifier for Vendor (IDFV)

Identifier for Vendor (IDFV) change when all apps from the same vendor are removed. If the vendor has only one app means this ID can change if you uninstall and reinstall app.

Third Part Alternative:

  • FCUUID

If you are ok with third party solution you can check: FCUUID

With FCUUID you can generate ID with different level of persistence.

If you need more persistence than Identifier for Vendor (IDFV) use uuidForDevice of FCUUID.

//changes only on system reset, this is the best replacement to the good old udid (persistent to device)
+(NSString *)uuidForDevice;

You will find a very interesting discussion about different IDs in this post:

  • The Developer’s Guide to Unique Identifiers
  • UIDevice uniqueIdentifier Deprecated - What To Do Now?
  • iOS unique user identifier

I hope you get some help from this information.



来源:https://stackoverflow.com/questions/41217864/unable-to-have-a-unique-ios-device-as-advertising-identifier-returned-as-000000

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