是否可以使用 Xcode 4 为 IOS 4.0 编译 iPhone 应用程序
有谁知道如何使用 Xcode 4 编译针对 iOS 4.0 的 iPhone 应用程序?
看来只能选择iOS 4.2作为目标。
预先感谢
彼得
Does anyone know how to compile an iPhone app targeting iOS 4.0 using Xcode 4?
It seems that it is only possible to select iOS 4.2 as target.
Thanks in advance
Peter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个“部署目标”设置和一个“基础 SDK”设置。您可以通过单击树顶部的项目名称来设置部署目标,然后打开“摘要”页面。 Deployment Target为第4项,可设置为4.0。
“Base SDK”位于“Build Settings”页面上,通常是您安装的最新 SDK,但如果您不厌其烦地保留它们,也可以将其设置为较旧的 SDK。通常情况下您不需要这样做,因为只要您将编码限制为较旧的 API,使用较新的 SDK 构建的应用程序就应该在较旧的 iOS 版本上运行。
因此,如果您将部署目标设置为 4.0 或更早版本并且不使用 4.0 之后引入的任何方法,则使用 4.2 SDK 构建的应用程序应该可以在 iOS 4.0 上正常运行。
另请参阅:
There's a "Deployment Target" setting and a "Base SDK" setting. You can set the deployment target by clicking on the project name at the top of the tree, then bring up the "Summary" page. Deployment Target is the 4th item, and can be set to 4.0.
"Base SDK" is on the "Build Settings" page and is usually the latest SDK you have installed, but can be set to older SDKs if you go to the trouble to keep them around. Normally you shouldn't need to though, because apps built with newer SDKs should run on older iOS versions as long as you restrict your coding to the older API.
So an app built with the 4.2 SDK should run fine on iOS 4.0 if you set the deployment target to 4.0 or earlier and don't use any methods introduced after 4.0.
See also: