ios 无法构建模块 Darwin - arm64 问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18942716/
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
Could not build module Darwin - arm64 issues
提问by IainGM
I developed my first XCode5 ONLY app which is very similar to the apps I have done on 4.6. It runs perfectly OK in the simulator and on my iPhone 4, 4S and 5, as well as my 2 iPads.
However, when I try to validate it for submission to the App Store, I get a whole stack of errors relating to arm64 requires 7.0.0 or later. I have the deployment target set to 6.1 and this does not happen when I run my previous apps in Xcode 5 that had been started in 4.6.
If I change the deployment target to 7.0 then everything is OK.
What is happening here? What do I need to change to get it to validate on 6.1?
Thanks.
我开发了我的第一个 XCode5 ONLY 应用程序,它与我在 4.6 上完成的应用程序非常相似。它在模拟器和我的 iPhone 4、4S 和 5 以及我的 2 个 iPad 上运行得非常好。但是,当我尝试验证它以提交到 App Store 时,我收到了一大堆与 arm64 需要 7.0.0 或更高版本相关的错误。我将部署目标设置为 6.1,当我在 4.6 中启动的 Xcode 5 中运行我以前的应用程序时,不会发生这种情况。如果我将部署目标更改为 7.0,则一切正常。这里发生了什么?我需要更改什么才能使其在 6.1 上验证?谢谢。
EDIT: OK, I changed the Architectures in Build Settings to Standard (armv7, armv7s) removing arm64, and everything was OK. Was that the right thing to do? Presumably it will still run on the iPhone 5S, but not in 64-bit. Correct?
编辑:好的,我将构建设置中的架构更改为标准(armv7,armv7s),删除了 arm64,一切正常。这是正确的做法吗?据推测,它仍会在 iPhone 5S 上运行,但不会在 64 位上运行。正确的?
回答by iccir
You can't yet submit 64-bit and still support iOS 6. You will be able to next month, however.
你还不能提交 64 位并且仍然支持 iOS 6。但是你下个月就可以了。
See https://developer.apple.com/news/index.php?id=9162013a
见https://developer.apple.com/news/index.php?id=9162013a
Edit: Yes, if you have armv7 and armv7s, you will still run on the iPhone 5s, although in 32-bit mode. I'd recommend submitting with armv7/armv7s now, and adding in arm64 next month.
编辑:是的,如果你有 armv7 和 armv7s,你仍然可以在 iPhone 5s 上运行,尽管是 32 位模式。我建议现在使用 armv7/armv7s 提交,并在下个月添加 arm64。
Update November 1, 2013:
2013 年 11 月 1 日更新:
According to the 2013-10-22 version of the 64-bit Transition Guide for Cocoa Touch, you can now use Xcode 5.0.1 to generate a binary that includes 64-bit and 32-bit architectures, and runs on older iOS versions.
根据Cocoa Touch 64 位过渡指南的 2013-10-22 版本,您现在可以使用 Xcode 5.0.1 生成包含 64 位和 32 位架构的二进制文件,并在较旧的 iOS 版本上运行。
- You need to use Xcode 5.0.1
- The 64-bit version can only run on 64-bit devices running iOS 7.0.3+
- The 32-bit version can only run on devices running iOS 5.1.1+
- 64-bit devices running iOS 7.0.0-7.0.2 will use the 32-bit slice
- 您需要使用 Xcode 5.0.1
- 64 位版本只能在运行 iOS 7.0.3+ 的 64 位设备上运行
- 32 位版本只能在运行 iOS 5.1.1+ 的设备上运行
- 运行 iOS 7.0.0-7.0.2 的 64 位设备将使用 32 位切片
回答by Tamás Zahola
You have to use iOS 7.0 as deployment target to build for arm64. If you wish to support iOS 6.1, you'll have to stick with armv7s at most. As arm64 processors can run in 32-bit mode, this shouldn't be an issue.
您必须使用 iOS 7.0 作为部署目标才能为 arm64 构建。如果你想支持 iOS 6.1,你最多只能坚持使用 armv7s。由于 arm64 处理器可以在 32 位模式下运行,这应该不是问题。
回答by Danny Qian
OK, I solve the problem by changing "Always Search User Paths" in "Search Paths" to "No" and everything works well again. And I set the parameter to "Yes", the program is still OK. I have no idea why this happened.
好的,我通过将“搜索路径”中的“始终搜索用户路径”更改为“否”来解决问题,并且一切正常。而且我把参数设置为“是”,程序还是可以的。我不知道为什么会这样。
This problem happened when I change the folder's position which have the program.
当我更改包含该程序的文件夹的位置时,会发生此问题。
回答by timv
I had this issue rise up when I added a BOOL variable. #import UIKit/UIKit.halso showed as an error. Here is a screen shot of the changes you need to make from the default project.
当我添加一个 BOOL 变量时,我遇到了这个问题。 #import UIKit/UIKit.h也显示为错误。以下是您需要对默认项目进行的更改的屏幕截图。
Before:
After:
之前:
之后:
回答by Alex Nazarsky
You should set Enable Modules (C and objective c) as NO in Build settings:
Apple LLVM 5.0
- language
- Modules
.
您应该在构建设置中将启用模块(C 和目标 c)设置为 NO:
Apple LLVM 5.0
- language
- Modules
。
回答by Gilberto Loubach
Solved this problem by changing where created my project, when creating my project, I saved on my desktop and it worked when I created a repository, he showed this problem.
通过更改创建我的项目的位置解决了这个问题,在创建我的项目时,我保存在我的桌面上,并且在我创建存储库时它工作,他显示了这个问题。
I hope this answer helps someone.
我希望这个答案对某人有所帮助。
回答by Hermann Klecker
I have had pretty much the same stack of errors. Got more or less the same with two exceptions. Like user tjv I had an error on #import too. And I did not have the linker error related to arm64. The missing arm64 is probably the key difference in the symptom.
我有几乎相同的错误堆栈。大致相同,但有两个例外。像用户 tjv 一样,我在 #import 上也有错误。而且我没有与 arm64 相关的链接器错误。缺少 arm64 可能是症状的主要区别。
My problem was that I set several precompiler macros in my project file in the
我的问题是我在我的项目文件中设置了几个预编译器宏
Apple LLVM 5.1 - Preprocessing
Apple LLVM 5.1 - 预处理
section. Instead of setting MACRONAME=1
I typed MACRONAME= 1
As you might guess already. the extra space made all the difference.
部分。
你可能已经猜到了,而不是MACRONAME=1
我输入了设置MACRONAME= 1
。额外的空间使一切变得不同。