如何为 Xcode 3.2 获取 iPhone SDK 2.2.1?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1441321/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:51:09  来源:igfitidea点击:

How to get iPhone SDK 2.2.1 for Xcode 3.2?

iphonecocoa-touchxcodeuikit

提问by Jasarien

After my upgrade to Snow Leopard and Xcode 3.2 (which I really regret a lot!!), Xcode lost all the SDK's. I'm one of those old-fashioned idiots who still want to develop for 2.2.1. But Apple does not offer me an old SDK download.

在我升级到 Snow Leopard 和 Xcode 3.2 之后(我真的很后悔!!),Xcode 丢失了所有的 SDK。我是那些仍然想为 2.2.1 开发的老式白痴之一。但是 Apple 没有为我提供旧的 SDK 下载。

Now I was clever and made tons of time machine backups. But: What's the preferred way to get iPhone SDK 2.2.1 running with Xcode 3.2? Some guys said that's generally possible. I do hope so because I still don't believe in all those "faked" stats, and besided that, my app doesn't benefit from 3.x additional features so I would not want to constrain my market just for that lazyness.

现在我很聪明,做了大量的时间机器备份。但是:让 iPhone SDK 2.2.1 与 Xcode 3.2 一起运行的首选方法是什么?有些人说这通常是可能的。我确实希望如此,因为我仍然不相信所有那些“伪造”的统计数据,除此之外,我的应用程序并没有从 3.x 附加功能中受益,所以我不想仅仅因为这种懒惰而限制我的市场。

Any idea?

任何的想法?

采纳答案by zaph

Get the 3.1 final sdk, it has the 2.2.1 sdk in it. On disk its usual location is:

获取 3.1 最终版 sdk,其中包含 2.2.1 sdk。在磁盘上它通常的位置是:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk

Also included is 3.0 and 3.1.

还包括 3.0 和 3.1。

回答by Jasarien

Regardless of whether or not you're targeting iPhone OS 3.0 or not using any 3.0 specific features, you should always compile your app against the latest SDKs to benefit from bug fixes and performance improvements.

无论您的目标是 iPhone OS 3.0 还是不使用任何 3.0 特定功能,您都应该始终针对最新的 SDK 编译您的应用程序,以便从错误修复和性能改进中受益。

You can compile against the 3.0 SDK and set the iPhone OS Deployment Target to 2.2.1 and still cater for users who are using 2.2.1.

您可以针对 3.0 SDK 进行编译并将 iPhone OS 部署目标设置为 2.2.1,并且仍然可以满足使用 2.2.1 的用户的需求。

You may find that some methods have been deprecated, but that doesn't stop you from using them until you're ready to move on.

您可能会发现某些方法已被弃用,但这并不妨碍您在准备好继续之前使用它们。

回答by fbrereto

XCode 3.2 should have the prior iPhone SDKs available, just make sure you are setting your project's Base SDK setting to "iPhone OS 2.2.1". (Right-click on your top-level project icon in the Groups & Files browser in XCode and choose "Get Info", then go to the Build tab.)

XCode 3.2 应该有之前的 iPhone SDK 可用,只需确保您将项目的 Base SDK 设置设置为“iPhone OS 2.2.1”。(在 XCode 的组和文件浏览器中右键单击顶级项目图标,然后选择“获取信息”,然后转到“构建”选项卡。)

回答by Jacob Mouka

Raffaello and others are correct: you can use the latest SDK and still target (and test on) older SDKs. For example, I'm using iOS4.0 (xcode 3.2.3) and testing on my iPhone 3g running 3.1.3.

Raffaello 和其他人是正确的:您可以使用最新的 SDK,并且仍然针对(和测试)较旧的 SDK。例如,我使用 iOS4.0 (xcode 3.2.3) 并在运行 3.1.3 的 iPhone 3g 上进行测试。

To clarify the procedure: - go to project info > build tab - set Architectures:Base SDK (most likely) the latest - set Deployment:iPhone OS Deployment Target to what ever you want (I have the option to go as far back as 2.0).

澄清程序: - 转到项目信息 > 构建选项卡 - 设置架构:基础 SDK(最有可能)最新 - 将部署:iPhone OS 部署目标设置为您想要的任何内容(我可以选择回到 2.0 )。

Hope this helps someone.

希望这可以帮助某人。

回答by Raffaello Colasante

Like I said on other threads, the SDK and Deployment Target are different. You can still use the latest SDK to build for an older OS. Just go to your Target settings and under the Deployment section set the iPhone OS Deployment Target to whatever you'd like.

就像我在其他线程上所说的那样,SDK 和部署目标是不同的。您仍然可以使用最新的 SDK 为较旧的操作系统构建。只需转到您的目标设置,然后在部署部分下将 iPhone 操作系统部署目标设置为您想要的任何内容。

Cheers, Raffaello Colasante

干杯,拉斐尔·科拉桑特