如何在iOS上检索UDID? [英] How can I retrieve the UDID on iOS?

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

问题描述

我想知道是否可以找出用户的iPhone的UDID。

I was wondering if it was possible to find out the UDID of the user's iPhone. Can someone shed some light?

推荐答案

注意:从2013年5月1日起,苹果将不再接受访问设备UDID的应用

而是必须使用新方法 identifierForVendor advertisingIdentifier 在iOS 6+中访问此。有关详情,请参阅相关博文

Instead, you must use the new methods identifierForVendor and advertisingIdentifier in iOS 6+ for accessing this. See related post here for more detail.

旧方式(已弃用,将导致App Store拒绝)

Old way (deprecated and will result in App Store rejection)

NSString *udid = [[UIDevice currentDevice] uniqueIdentifier];

从iOS7开始, uniqueIdentifier 不再可用。

As of iOS7, the uniqueIdentifier property is no longer available.

请参阅 UIDevice 参考。

See the UIDevice reference.

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

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