如何在iOS设备中获取唯一ID? [英] How to get unique id in iOS device?

查看:161
本文介绍了如何在iOS设备中获取唯一ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用mac地址识别服务器端的iOS设备。使用iOS 7运行我的应用程序时无法检索正确的mac地址。或者我使用

I have used mac address to identify iOS devices in server side. When run my application with iOS 7 unable to retrieve the correct mac address. Alternately i used

NSUUID *oNSUUID = [[UIDevice currentDevice] identifierForVendor];
[strApplicationUUID setString:[oNSUUID UUIDString]];

属性。但是,每次新安装应用程序后,此值也会更改。现在我想检测服务器端的特定设备?如何在iOS中为每台设备获取一些唯一ID?

property. But this value also changed after every new installation of application. Now i want detect particular device in server side? How can i get some unique id per device in iOS?

推荐答案

您无法再为每台设备获取唯一ID。 identifierForVendor 是你最好的。 Apple系统地禁用了识别特定设备的功能,因此营销人员无法传递用户的ID。

You can no longer get a unique ID per device. identifierForVendor is the best you're going to get. Apple has systematically disabled identifying a specific device so that users' IDs can't be passed around by marketers.

这篇关于如何在iOS设备中获取唯一ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆