简体   繁体   English

如何在Xcode 4.2上支持不同的iOS SDK?

[英]How to support different iOS SDKs on Xcode 4.2?

After installing Xcode 4.2 there is only iOS 5.0 SDK in Xcode. 安装Xcode 4.2后,Xcode中只有iOS 5.0 SDK。 Also I should support iPhone 3G with iOS 4.2.1. 另外我应该支持iPhone 3G和iOS 4.2.1。 How support two or more SDKs for one App with one Xcode? 如何使用一个Xcode为一个应用程序支持两个或更多SDK? I tried install Xcode 3 with iOS SDK 4.3 but Xcode crashes when starting. 我尝试使用iOS SDK 4.3安装Xcode 3,但Xcode在启动时崩溃。

Set the deployment target of the App to iOS 4.2.1, this will allow all iOS devices running 4.2.1 or upwards to run your App, however, you won't get any compiler warnings if you use stuff from eg. 将应用程序的部署目标设置为iOS 4.2.1,这将允许运行4.2.1或更高版本的所有iOS设备运行您的应用程序,但是,如果您使用来自例如的内容,则不会收到任何编译器警告。 5.0, so double check your code and add branches if needed. 5.0,所以仔细检查你的代码并在需要时添加分支。 Another thing is that since Xcode 4.2, the compiler only generates armv7 code, but since you also want support for the iPhone 3G, you have to manually tell it to also generate armv6 code by selecting your target, switching to the Build Settings Tab and there adding armv6 to the Architectures list. 另一件事是,自Xcode 4.2以来,编译器只生成armv7代码,但由于你也想要支持iPhone 3G,你必须通过选择目标手动告诉它也生成armv6代码,切换到Build Settings选项卡并在那里将armv6添加到Architectures列表中。

Latest SDK included all required features from previous SDK versions. 最新的SDK包括以前SDK版本中的所有必需功能。 You shouldn't worry about it. 你不应该担心它。 If you want to support iPhone 3G just set iOS Deployment Target to iOS 4.2 (or another would you like) in project settings at Build Settings tab. 如果您想支持iPhone 3G,只需在Build Settings选项卡的项目设置中将iOS部署目标设置为iOS 4.2(或其他您想要的)。

Don't remember to test your application on that iOS version. 不记得在iOS版本上测试您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM