如何使用最新的Xcode下载针对较旧的iOS版本进行构建? [英] How to build against older iOS versions with the latest Xcode downloads?

查看:64
本文介绍了如何使用最新的Xcode下载针对较旧的iOS版本进行构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了多个版本的Xcode.我可以通过启动旧的Xcode针对旧的iOS版本构建项目.但是,如何使用较新的Xcode版本针对较旧的iOS版本进行构建?

I have multiple versions of Xcode installed. I can build my project against older iOS versions by launching old Xcode. But how could I use newer Xcode versions to build against older iOS versions?

在项目设置中,有一个Base SDK下拉列表.它仅提供最新的iOS版本供选择.

In the project settings there's a Base SDK dropdown. It only offers the very latest iOS version for selection.

在/Developer/Platforms/下,有一个包含以下内容的iOS.platform文件夹:

Under /Developer/Platforms/ there is an iOS.platform folder which contains this:

SDKs/
  iPhoneOS3.2.sdk
  iPhoneOS4.1.sdk

最后,还有一个有趣的文件夹,名为DeviceSupport,其中包含从3.0到4.1的一大堆版本!

And finally, there is an interesting folder called DeviceSupport, which contains a whole bunch of versions ranging from 3.0 to 4.1!

必须有一种方法可以将SDK/DeviceSupport文件从旧的Xcode复制到新的Xcode,并使旧版本的iOS 4.0甚至3.0正常运行.怎么样?

There must be a way to copy SDKs / DeviceSupport files from old Xcode to new Xcode and make the older ones like iOS 4.0 or even 3.0 working. How?

推荐答案

要使在多个iOS版本上运行的应用程序目标相对简单: 在项目设置中将基本SDK"设置为您可能需要其功能的iOS最新版本号. 将"iPhone OS部署目标"设置为您将支持的最早的iOS版本

To make an application target that runs on multiple versions of iOS is relatively simple: Set the "Base SDK" in your projects settings to the newest version number of iOS whose features you may want. Set the "iPhone OS Deployment Target" to the oldest version number of iOS that you will support

您将需要安装旧版本的xcode,因为更新的模拟器仅支持更新的ios版本

you will need to install older versions of xcode since the newer simulator will only support the newer ios versions

http://developer.apple.com/library/mac/#documentation/Xcode/Conceptual/XcodeCoexistence/Contents/Resources/en.lproj/Details/Details.html

这篇关于如何使用最新的Xcode下载针对较旧的iOS版本进行构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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