问题
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