如何在iOS 6和iOS 7中获取UDID [英] How to get the UDID in iOS 6 and iOS 7

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

问题描述

我想获取设备ID并将其发送到Web服务。如何在iOS 6中获得 UDID

I want to get the device id and send it into a web service. How can I get the UDID in iOS 6

谢谢

推荐答案

出于安全/隐私原因,iOS 6+中不再提供UDID。相反,使用 identifierForVendor advertisingIdentifier

UDID is no longer available in iOS 6+ due to security / privacy reasons. Instead, use identifierForVendor or advertisingIdentifier.


一个字母数字字符串,用于唯一标识应用程序
供应商的设备。 (只读)

An alphanumeric string that uniquely identifies a device to the app’s vendor. (read-only)

对于来自同一设备上运行的
同一供应商的应用,此属性的值相同。对于来自不同供应商的同一设备上的应用,以及不同供应商的不同设备上的
应用,返回不同的值

The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.



advertisingIdentifier:



advertisingIdentifier:


每个设备唯一的字母数字字符串,仅用于提供
广告。 (只读)

An alphanumeric string unique to each device, used only for serving advertisements. (read-only)

与UIDevice的identifierForVendor属性不同,返回给所有供应商的
值相同。此标识符可能会更改 - 例如,如果
用户删除了设备 - 因此您不应将其缓存。

Unlike the identifierForVendor property of UIDevice, the same value is returned to all vendors. This identifier may change—for example, if the user erases the device—so you should not cache it.

< a href =http://oleb.net/blog/2012/09/udid-apis-in-ios-6/ =nofollow noreferrer>这篇帖子解释得很好。

此外,请参阅Apple的文档 identifierForVendor advertisingIdentifier

Also, see Apple's documentation for the identifierForVendor and advertisingIdentifier.

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

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