How to get unique identifiacation number of iphone

半城伤御伤魂 提交于 2019-12-08 01:18:11

问题


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

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