如何在XCode4中定位iOS的早期版本? [英] How to target previous version of iOS in XCode4?

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

问题描述

如何在XCode4中定位iOS的早期版本?我的应用仅针对iOS 4.3设备构建,我希望安装了iOS 3.0的用户也能够运行该应用。

How can I target a previous version of iOS in XCode4? My app is building only for iOS 4.3 devices and I'd like users with iOS 3.0 installed to be able to run the app as well.

推荐答案

在项目浏览器中选择项目,然后在详细信息视图中选择目标。在摘要选项卡下,您具有部署目标。将其设置为3.0。或者,您可以在构建设置中设置iOS部署目标。两种方式都可以更改相同的参数,只是两种不同的访问方式。

Select the project in the Project Navigator and the then the target in the detail view. Under the summary tab you have the Deployment Target. Set it to 3.0. Alternatively you can set the iOS Deployment Target in the build settings. Both ways change the same parameter, it's just two different ways to access it.

这将允许您的应用在iOS 3.0上运行,但仍可针对SDK 4.3进行编译Xcode 4要求。因此请注意,不要使用任何要求OS版本低于3.0的SDK项,否则,请使用if语句正确检查它们。这些问题可能会让人有些痛苦,因为它们会在运行时显现出来。

This will allow your app to run on iOS 3.0 but it's still compiling against SDK 4.3 which is required by Xcode 4. So be careful that you don't use any SDK items that require an OS newer than 3.0 or if you do that they're properly checked with an if statement. These issues can be a bit of a pain since they manifest themselves at runtime.

这篇关于如何在XCode4中定位iOS的早期版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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