如何在iOS 6和iOS 7中获得UDID

如何在iOS 6和iOS 7中获得UDID,第1张

概述参见英文答案 > UIDevice uniqueIdentifier Deprecated – What To Do Now?                                    31 我想获取设备ID并将其发送到Web服务.如何在iOS 6中获得UDID? 谢谢 由于安全/隐私的原因,UDID在iOS 6中不再可用.而应使用identifierForVendor或adverti 参见英文答案 > UIDevice uniqueIdentifier Deprecated – What To Do Now?31
我想获取设备ID并将其发送到Web服务.如何在iOS 6中获得UDID?

谢谢

解决方法 由于安全/隐私的原因,UDID在iOS 6中不再可用.而应使用IDentifIErForvendor或advertisingIDentifIEr.

IDentifIErForvendor:

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:

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

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.

This帖子解释得很好.

另请参阅Apple的identifierForVendoradvertisingIdentifier文档.

总结

以上是内存溢出为你收集整理的如何在iOS 6和iOS 7中获得UDID全部内容,希望文章能够帮你解决如何在iOS 6和iOS 7中获得UDID所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1112054.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存