如何在 XCode5 中将部署目标更改为 5.1.1 [英] how can I change the deployment target to 5.1.1 in XCode5

查看:30
本文介绍了如何在 XCode5 中将部署目标更改为 5.1.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个项目中工作,我需要支持 iOS 5.1.1,但在部署目标"下拉菜单中,我没有 5.1.1 作为选项:

I'm working in a project and I need to support iOS 5.1.1 but in the drop menu of "deployment target" I don't have 5.1.1 as option:

我想问你们的问题是如何将 iOS 5.1.1 添加为部署目标?

My question for you guys is how can I add the iOS 5.1.1 as deployment target?

非常感谢您的帮助.

推荐答案

如果您愿意,您可以在框中手动键入它,即使这不能作为下拉选项提供,或者您可以从构建设置">部署">iOS 部署目标"部分.

You can type it by hand in the box, if you feel like, and even if this is not available as a dropdown option or you can do the same from "Build Settings">"Deployment">"iOS Deployment Target" section.

但是,如果您必须低于 5.1.1,请确保您在构建设置">架构">架构"中使用 64 位架构 $(ARCHS_STANDARD_INCLUDING_64_BIT)"部分.仅坚持标准 ARM 32 位架构 $(ARCHS_STANDARD).

However, if you have to go below 5.1.1, please make sure that you have not used 64 bit architecture $(ARCHS_STANDARD_INCLUDING_64_BIT) in your "Build Settings">"Architectures">"Architectures" section. Stick to standard ARM 32 bit architecture $(ARCHS_STANDARD) only.

(这部分与实际答案没有直接关系)

(This portion is not directly related to the actual answer)

从 Xcode 6 开始,$(ARCHS_STANDARD) 默认包含 64 位架构(armv7 arm64).因此,如果您使用 $(ARCHS_STANDARD) 使用默认的发布"配置归档代码,它将创建一个包含 armv7 和 arm64 切片的胖二进制文件.不幸的是,5.1.1 之前的 iOS 不支持这种二进制文件.

Starting from Xcode 6, $(ARCHS_STANDARD) includes 64 bit architecture, by default (armv7 arm64). So, if you archive your code with default "Release" configuration with $(ARCHS_STANDARD), it will create a fat binary with both armv7 and arm64 slices it it. Unfortunately, that kind of binary is not supported in iOS prior to 5.1.1.

因此,如果您仍在为低于 5.1.1 的 iOS 计划应用程序,则应明确地将发布"架构设置为 armv7(也可能是 armv7s).或者,您可以为仅 armv7(和 armv7s)架构创建单独的构建配置,并使用发布"和自定义配置分别存档您的代码.尽管如此,这对于 App Store 部署来说绝不是一个好主意.

So if you are still planning your app for iOS less than 5.1.1 you should set your "Release" architecture to armv7 (and may be armv7s also), explicitly. Alternatively, you could create a separate build configuration for armv7(and armv7s) only architecture and archive your code seperately with both of your "Release" and custom configurations. Although, this is never a good idea for App Store deployment.

这篇关于如何在 XCode5 中将部署目标更改为 5.1.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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