问题
I want to get unique id of iphone.currently I am using Display.getInstance().getUdid();
but it gives different unique id each time I install an application on iphone.
Can you please let me how to resolve it?
回答1:
You can no longer get the Unique id per device because of apples revised security policy . identifierForVendor is the best alternative you can go for. You can try
UIDevice *device = [UIDevice currentDevice];
NSString *currentDeviceId = [[device identifierForVendor]UUIDString];
回答2:
You can get it by calling this function:
UIDevice.currentDevice().identifierForVendor
回答3:
getUDID()
returns a faux number that can't be made unique due to Apple's restrictions.
来源:https://stackoverflow.com/questions/39037814/how-to-get-unique-identifiacation-number-of-iphone