2

当我尝试为我尝试提交的应用程序(我的第一次提交)构建存档时,我遇到了一堆错误,主要是与 Darwin 相关的导入错误:

ProcessPCH /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.pch Steampunk /Steampunk\ Clock-Prefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Users/jonathan/Desktop/Steampunk Clock"
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/ usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault。xctoolchain/usr/bin/clang -x objective-c-header -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc - fmodules -fmodules-cache-path=/Users/jonathan/Library/Developer/Xcode/DerivedData/ModuleCache -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return -type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate -方法匹配 -Wno-missing-braces -W括号 -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion-Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode .app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min =5.0 -iquote /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient \ Steampunk\ 时钟生成的文件。hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-own-target-headers.hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release- iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-all-target-headers.hmap -iquote /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/ IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock。build/Ancient\ Steampunk\ Clock-project-headers.hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/BuildProductsPath/Release-iphoneos/include - I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/ IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/DerivedSources/arm64 -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/ IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock。build/DerivedSources -F/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/BuildProductsPath/Release-iphoneos --serialize-diagnostics /Users/jonathan/Library/Developer /Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.dia -MMD -MT 依赖项 -MF /Users/jonathan/库/开发者/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\Clock/PrecompiledHeaders/Steampunk\Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\Clock-Prefix.pch。d -c /Users/jonathan/Desktop/Steampunk\ Clock/Steampunk\ Clock/Steampunk\ Clock-Prefix.pch -o /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/ Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.pch

错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
产生 1 个错误。
/Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:7:9:致命错误:无法构建模块“Darwin”
#进口
 ~~~~~~~^
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8 中包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9:致命错误:无法构建模块“达尔文”
#进口
 ~~~~~~~^
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h 导入的模块“Foundation”时:8:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h 导入的模块“CoreFoundation”时:6:
在从 :1 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10:致命错误:无法构建模块“达尔文”
#包括
 ~~~~~~~~^
产生 2 个错误。
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10:致命错误:无法构建模块“CoreFoundation”
#包括
 ~~~~~~~~^
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h 导入的模块“Foundation”时:8:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h 导入的模块“ObjectiveC”时:6:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/message.h:28 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/objc.h:31:10:致命错误:无法构建模块'Darwin '
#include // 对于 __DARWIN_NULL
 ~~~~~~~~^
产生 2 个错误。
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h 导入的模块“Foundation”时:8:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h 导入的模块“安全”时:9:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:24 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:32:10:致命错误:无法构建模块“达尔文”
#包括
 ~~~~~~~~^
产生 2 个错误。
产生 8 个错误。
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h 导入的模块“CoreGraphics”时:8:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:159:11:致命错误:无法构建模块“达尔文”
# 包括
  ~~~~~~~~^
产生 2 个错误。
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h 导入的模块“CoreImage”时:10:
在从 :1 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8:9:致命错误:无法构建模块“基础”
#进口
 ~~~~~~~^
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10:致命错误:无法构建模块“达尔文”
#包括
 ~~~~~~~~^
产生 2 个错误。
产生 4 个错误。
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSText.h 导入的模块“CoreText”时:9:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:20 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h:29:11:致命错误:无法构建模块“达尔文”
# 包括
  ~~~~~~~~^
产生 2 个错误。
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h 导入的模块“QuartzCore”时:11:
在从 :1 包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6 中包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:6 中包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6 中包含的文件中:
在 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:13 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stdint.h:33:16:致命错误:无法构建模块“Darwin”
#include_next
  ~~~~~~~~~~~~~^
错误:架构“arm64”的部署目标“5.0.0”无效(需要“7.0.0”或更高版本)
在构建从 /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14 导入的模块“UIKit”时:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h 导入的模块“QuartzCore”时:11:
在构建从 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h 导入的模块“OpenGLES”时:7:
在从 :1 包含的文件中:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10:致命错误:无法构建模块“基础”
#包括
 ~~~~~~~~^
产生 2 个错误。
产生 4 个错误。
产生 22 个错误。
产生 25 个错误。

所以看起来我要求 iOS 5.0 兼容 64 位设备;我该如何清除?

我还能如何解决这些错误?

4

3 回答 3

5

通过仔细阅读错误可以找到答案。这似乎表明您的目标为 5.0.0 的应用不支持 arm64。如果此答案满足您的用例,请不要忘记接受答案,以便其他用户找到解决方案。

高级概念

Arm64 刚刚引入以支持 iOS7,因此它不存在于 iOS5 设备上。需要记住的是,iOS5 设备不支持任何 iOS7 特定功能。

低级细节

具体到您看到的错误:

注意有效架构设置的定义:

实际应该为其构建目标的架构的空格分隔列表。对于每个目标,此列表与“架构”中指定的列表相交,并构建结果集。这允许单个目标“选择退出”特定架构的构建。如果生成的架构集为空,则不会生成可执行文件。[VALID_ARCHS]

您可以通过从调试/发布代码中删除 arm64 文本来更改目标设备的架构。这样做的效果是您的应用程序只能在 5s 设备上以 32 位模式运行。删除 arm64 设置后,您当前的错误应该会消失。

选择您的项目 > 点击构建设置 > 有效架构

搜索“拱门”(无引号)> 搜索词

双击空白区域(在目标和项目列下)> 选择 arm64 > 点击弹出框底部的减号按钮

弹出菜单

于 2013-10-22T14:49:42.260 回答
1

iOS5 是 32 位操作系统。

如果您想支持 iOS5 的部署目标,那么您需要转到 Build Settings 并从架构中删除 arm64,但将其保留在有效架构中。只保留armv7和armv7s。64 位设备(目前只有 iPhone5 S)能够运行 32 位代码。因此,除非您编写了代码来利用 64 位处理器,否则 arm64 对于包含在架构中并不重要。

如果您真的想支持 arm64 或者您不需要支持任何旧版本的 iOS,那么您需要将部署目标更改为 iOS7

于 2013-10-22T14:40:06.880 回答
0

大量的这些错误希望您将部署目标从 5.0 更改为 7.0

如果您将其更改为 7.0,则意味着运行 iOS7 的人将能够下载和运行您的应用程序,但任何使用旧版本 iOS 的人都不能。

或者,如果您想支持旧版本的 iOS,则必须找到旧版本不支持的所有代码部分,并编写一些支持代码。

更改目标很容易,它位于应用程序目标的“常规”选项卡上。

于 2013-10-22T14:38:06.527 回答