当我尝试为我正在尝试提交的应用程序(我的第一次提交)构建存档时,我收到了一堆错误,主要是与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\ Clock/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-method-match -Wno-missing-braces -Wparentheses -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\ Clock-generated-files.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 dependencies -MF /Users/jonathan/Library/Developer/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 error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) 1 error generated. /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:7:9: fatal error: could not build module 'Darwin' #import ~~~~~~~^ error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: In file included from :1: In file included from /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: fatal error: could not build module 'Darwin' #import ~~~~~~~^ error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6: In file included from :1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: fatal error: could not build module 'Darwin' #include ~~~~~~~~^ 2 errors generated. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module 'CoreFoundation' #include ~~~~~~~~^ error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: While building module 'ObjectiveC' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:6: In file included from :1: In file included from /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: fatal error: could not build module 'Darwin' #include // for __DARWIN_NULL ~~~~~~~~^ 2 errors generated. error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8: While building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9: In file included from :1: In file included from /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: fatal error: could not build module 'Darwin' #include ~~~~~~~~^ 2 errors generated. 8 errors generated. error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'CoreGraphics' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:8: In file included from :1: In file included from /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: fatal error: could not build module 'Darwin' # include ~~~~~~~~^ 2 errors generated. error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:10: In file included from :1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8:9: fatal error: could not build module 'Foundation' #import ~~~~~~~^ error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10: fatal error: could not build module 'Darwin' #include ~~~~~~~~^ 2 errors generated. 4 errors generated. error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'CoreText' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSText.h:9: In file included from :1: In file included from /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: fatal error: could not build module 'Darwin' # include ~~~~~~~~^ 2 errors generated. error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11: In file included from :1: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:6: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6: In file included from /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: fatal error: could not build module 'Darwin' # include_next ~~~~~~~~~~~~~^ error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later) While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14: While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11: While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7: In file included from :1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation' #include ~~~~~~~~^ 2 errors generated. 4 errors generated. 22 errors generated. 25 errors generated.
所以看起来我已经要求为64位设备提供iOS 5.0兼容性;我该如何清除?
我还能如何解决这些错误?
答案 0 :(得分:5)
通过仔细阅读错误可以找到答案。它似乎表明您的应用目标5.0.0不支持arm64。如果这个答案满足您的使用案例,请不要忘记接受答案,以便其他用户找到解决方案。
高级概念
Arm64刚刚推出以支持iOS7,因此在iOS5设备上不存在。需要记住的是,iOS5设备不支持任何iOS7特定功能。
低级细节
具体到您所看到的错误:
请注意有效体系结构设置的定义:
以空格分隔的体系结构列表,其中应实际构建目标。对于每个目标,此列表与“体系结构”中指定的列表相交,并生成结果集。这允许单个目标“选择退出”特定体系结构的构建。如果生成的体系结构集为空,则不会生成任何可执行文件。 [VALID_ARCHS]
您可以通过从调试/发布代码中删除arm64文本来更改所定位设备的体系结构。这样做的结果是您的应用程序将仅在5s设备上以32位模式运行。删除arm64设置时,当前错误应该消失。
选择您的项目>点击构建设置>
搜索'arch'(无引号)>
双击白色空间(在目标和项目列下)>选择arm64>点击弹出框底部的减号按钮
答案 1 :(得分:1)
iOS5是32位操作系统。
如果您想支持iOS5的部署目标,那么您需要转到构建设置并从架构中删除arm64,但将其保留在有效的体系结构中。只需保留armv7和armv7s。 64位设备(目前只有iPhone5 S)能够运行32位代码。因此,除非您已编写代码以利用64位处理器,否则arm64对于包含在架构中并不重要。
如果您真的想支持arm64,或者您不需要支持任何旧版本的iOS,那么您需要将部署目标更改为iOS7
答案 2 :(得分:0)
大量的这些错误要求您将部署目标从5.0更改为7.0
如果您将其更改为7.0,则表示运行iOS7的用户可以下载并运行您的应用,但任何使用旧版iOS的用户都不会。
或者,如果您想支持旧版本的iOS,则必须找到旧版本不支持的代码的所有部分,并编写一些支持代码。
更改目标很简单,它位于应用目标的“常规”标签上。