有没有办法在Xcode中安装旧的iOS SDK? [英] Is there a way to install older iOS SDKs in Xcode?

查看:140
本文介绍了有没有办法在Xcode中安装旧的iOS SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望通过使用较旧的SDK编译它们以测试更新的类和方法,确保我的应用程序具有一些向后兼容性。但是,Xcode仅适用于最新iOS版本的SDK。

I'd like to ensure some backward compatibility for my apps by compiling them using the older SDKs to test for newer classes and methods. However, Xcode is only available with SDKs for the latest iOS versions.

我已经下载并安装了iOS 3.1.3 SDK(使用此处描述的方法)并且工作正常。我的代码是__IPHONE_OS_VERSION_MAX_ALLOWED,__ IPHONE_OS_VERSION_MIN_REQUIRED以及这样的respondsToSelector已满(不太满:-))。

I've downloaded and installed the iOS 3.1.3 SDK (using the method described here) and that works fine. My code is full (not so full :-) ) of __IPHONE_OS_VERSION_MAX_ALLOWED, __IPHONE_OS_VERSION_MIN_REQUIRED and such respondsToSelector.

现在适用于iOS 3.1.3 SDK,但是如果在未来我想用4.0 SDK重复这个过程?是否有在最新的Xcode中安装旧SDK版本的一般过程?

This works right now for the iOS 3.1.3 SDK, but what if in the future I wanted to repeat this process with the 4.0 SDK? Is there a general process for installing older SDK versions in the latest Xcode?

推荐答案

您无法在Xcode上安装旧的3.1 SDK 4.您可以将部署目标设置为较低,以允许在运行比当前SDK安装版本更旧的OS版本的设备上进行测试。在运行更新版本的Xcode时,唯一能够完全确保向后兼容性的方法是保留运行iOS 3.x的设备,并在该设备上进行测试。 (...因为声称旧的模拟器/工具有时实际上允许在不具有相同版本操作系统的实际设备上运行的API。)

You can't install old 3.1 SDKs on Xcode 4. You can set the Deployment target lower to allow testing on devices running older OS versions than your current SDK installation. The only current way to completely ensure backward compatibility, while running more recent versions of Xcode, is to keep a device that runs iOS 3.x, and test on that device. (...because it is claimed that the old Simulators/tools sometimes actually allows APIs that won't run on an actual device with an OS of the same version).

其他方法包括在单独的Developer_XYZ目录中安装不同版本的iOS开发人员工具,或者使用旧的iOS开发人员工具安装保持可启动HD(比如Snow Leopard和Xcode 3.x,因为Lion可能只支持运行Xcode 4) .x)。

Other methods include installing the different versions of iOS developer tools in a separate Developer_XYZ directories, and or keeping around a bootable HD with the older iOS developer tool installation (say Snow Leopard with Xcode 3.x, since Lion might only support running Xcode 4.x).

这篇关于有没有办法在Xcode中安装旧的iOS SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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