如何处理在iOS 5及更低版本上为identifierForVender运行的应用程序 [英] What to do with apps running on iOS 5 and below for identifierForVender

查看:108
本文介绍了如何处理在iOS 5及更低版本上为identifierForVender运行的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去几天我听说Apple正在制作它,以便使用运行它们的设备的UDID标识符的应用程序将被Apple App商店拒绝(这是我读过这里的内容)。他们建议开发人员使用iOS 6中引入的 identifierForVender 。我没有这个易于转换的问题,但如果我仍然想要我会使用什么支持在 iOS 以下 iOS 下运行的设备?我还可以使用UDID标识符吗?我不相信这很清楚。

I have heard over the last couple of days that Apple are making it so that apps that use the UDID identifier of the device that they are running on will be rejected from the Apple App store (Here is where I have read this). They advise developers to use the identifierForVender which was introduced in iOS 6. I don't have an issue with this easy to change over, but what do I use if I still want to support devices running on an iOS below iOS6? Can I still use the UDID identifier or not? I don't believe this is very clear.

推荐答案

如果继续使用 uniqueIdentifier 独立于iOS版本。我建议使用 OpenUDID ,这是已弃用的 uniqueIdentifier的替代品。

Your app will be rejected if you continue to use uniqueIdentifier independently of the iOS version. I recommend using OpenUDID instead, which is a drop-in replacement for the deprecated uniqueIdentifier.

您可以检查 identifierForVendor 是否可用,或者您可以使用OpenUDID所有情况。

You could check whether identifierForVendor is available, or you can use OpenUDID in all cases.

if ([[UIDevice currentDevice] respondsToSelector:@selector(identifierForVendor)]) {
    // Use: [[[UIDevice currentDevice] identifierForVendor] UUIDString];
} else {
    // Use: [OpenUDID value];
}

这篇关于如何处理在iOS 5及更低版本上为identifierForVender运行的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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