ios $(ARCHS_STANDARD_32_BIT) vs. armv6, armv7/armv7s vs. i386
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8323343/
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
$(ARCHS_STANDARD_32_BIT) vs. armv6, armv7/armv7s vs. i386
提问by Besi
I have an iPhone App which should run on armv7 as well as armv6. For debugging the App should run in the simulator too.
我有一个应该在 armv7 和 armv6 上运行的 iPhone 应用程序。为了调试应用程序也应该在模拟器中运行。
The Standard in Xcode 4.2 is this:
Xcode 4.2 中的标准是这样的:
armv7 ($(ARCHS_STANDARD_32_BIT)
)
armv7 ( $(ARCHS_STANDARD_32_BIT)
)
It is not clear to me what $(ARCHS_STANDARD_32_BIT)
stands for and if I should use the two:
我不清楚什么$(ARCHS_STANDARD_32_BIT)
代表以及我是否应该使用这两个:
- $(ARCHS_STANDARD_32_BIT)
- armv6
- $(ARCHS_STANDARD_32_BIT)
- armv6
Or all three like this
或者三个都这样
- armv6
- armv7
- i386
- armv6
- armv7
- i386
What is the best option for this in my case? And how does Architectures
work with Valid Architectures
在我的情况下,最好的选择是什么?以及如何Architectures
使用Valid Architectures
回答by k1th
To run in the simulator you don't have to do anything.
要在模拟器中运行,您无需执行任何操作。
You can leave the Valid Architectures
setting at armv6 armv7
, because, according to the docs:
您可以将Valid Architectures
设置保留在armv6 armv7
,因为,根据文档:
During the build, this list is intersected with the value of ARCHS build setting
在构建期间,此列表与 ARCHS 构建设置的值相交
To support armv6 and armv7, set the architectures to $(ARCHS_STANDARD_32_BIT) armv6
, $(ARCHS_STANDARD_32_BIT) currently expands to armv7.
要支持 armv6 和 armv7,请将架构设置为$(ARCHS_STANDARD_32_BIT) armv6
,$(ARCHS_STANDARD_32_BIT) 目前扩展到 armv7。
Also check if there is a "Required device capabilities" = UIRequiredDeviceCapabilities
setting in your plist file, as Xcode will add armv7 for new projects there.
还要检查UIRequiredDeviceCapabilities
plist 文件中是否有“必需的设备功能”=设置,因为 Xcode 会在那里为新项目添加 armv7。
回答by Besi
Update with Xcode 4.5: Apple added the new architecture armv7s
, which adds optimisations for the new hardware of the iPhone 5.
Xcode 4.5 更新:Apple 添加了新架构armv7s
,为 iPhone 5 的新硬件添加了优化。
Since I could not test our app on the new iPhone5, I removed this architecture from our app by changing the supported architecture from $(ARCHS_STANDARD_32_BIT)
(which means armv7
+ armv7s
) to only armv7
.
由于我无法在新的 iPhone5 上测试我们的应用程序,我通过将支持的架构从$(ARCHS_STANDARD_32_BIT)
(这意味着armv7
+ armv7s
) 更改为 only 来从我们的应用程序中删除此架构armv7
。
If you want or have to support the older iPhone 3G you also need to addd armv6
.
如果您想要或必须支持较旧的 iPhone 3G,您还需要添加armv6
.
You need to do this for both Architecturesand Valid Architectures.
您需要为Architectures和Valid Architectures执行此操作。