Objective C: Missing architecture
When I go to validate my app, I get the error
executable is missing a required architecture. At least one of the following architectures must be present: armv6
I'm using Xcode 4.2 and the iOS5 SDK and deploying to 3.2. This never happened before I updated the SDK.
I'm also getting several warnings coming up when I build for archiving:
Check dependencies
[WARN]Warning: Multiple build commands for output file/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/charset.alias
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libcurl.la
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libgcrypt.la
[WARN]Warning: Multiple build commands for output f开发者_如何学Goile /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libgpg-error.la
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libsasl2.la
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libssh2.la
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libcrypto.pc
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libssh2.pc
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/libssl.pc
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/openssl.pc
[WARN]Warning: Multiple build commands for output file /Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/zlib.pc
[BWARN]warning: iPhone apps with a deployment target lower than 4.3 should include an armv6 architecture (current IPHONEOS_DEPLOYMENT_TARGET = "3.2", ARCHS = "armv7").
Ld "/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/Math Buddy" normal armv7
cd "/Volumes/iOS Development/Apps/Math Buddy"
setenv IPHONEOS_DEPLOYMENT_TARGET 3.2
setenv PATH "/Developer-4.2/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer-4.2/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer-4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -arch armv7 -isysroot /Developer-4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk -L/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos "-L[sdk=iphonesimulator3.2][arch=*]" -L= -L/Volumes/iOS -LDevelopment/Apps/Math -LBuddy/../iPhoneSimulator-3.2/lib "-L[sdk=iphoneos3.2][arch=*]" -L= -L/Volumes/iOS -LDevelopment/Apps/Math -LBuddy/../iPhoneOS-3.2/lib "-L/Volumes/iOS Development/Apps/Math Buddy/iPhoneOS-3.2/lib" "-L/Volumes/iOS Development/Apps/Math Buddy/iPhoneSimulator-3.2/lib" -F/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos -filelist "/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Intermediates/Math Buddy.build/Distribution-iphoneos/Math Buddy.build/Objects-normal/armv7/Math Buddy.LinkFileList" -dead_strip -miphoneos-version-min=3.2 -framework UIKit -framework Foundation -framework CoreGraphics -lcrypto -lcurl -letpan -lgcrypt -lgpg-error -lsasl2 -lssh2 -lssl -lz -lcrypto -lcurl -letpan -lgcrypt -lgpg-error -lsasl2 -lssh2 -lssl -lz -o "/Users/chrismanahan/Library/Developer/Xcode/DerivedData/Math_Buddy-cywtminuxpdkhkanmtqkswygozhr/Build/Products/Distribution-iphoneos/Math Buddy.app/Math Buddy"
I found the answer on another stack question. All I had to do was add an array entry for Required device capabilities
"Warning: iPhone apps should include an armv6 architecture" even with build config set
I just tried the same configuration and in Architectures is says: $(ARCHS_STANDARD_32_BIT) armv6. With this and target 3.2 I dont get any warning. Check your architectures is they are the same. So it seems that armv6 must be present. Just go to your Target -> Build Settings -> Architecture. Doublie-click -> others and add armv6, that should solve your problem.
project -> edit project settings -> in build tab search with "active" then unselect build active arch only
If you uncheck "Build Active Architecture Only", then it will build all the valid architectures.
originally taken from here...
精彩评论