I just updated to the newly released Xcode 5. I have an iOS app under development that uses the Google Maps iOS SDK. Back when I was developing in Xcode 4, I changed my Architectures
setting in my project settings, as per step 7 of Google's instructions for adding the SDK to the project:
7. Choose your project, rather than a specific target, and open the Build Settings tab. Replace the default value of Architectures with armv7. In the Other Linker Flags section, add -ObjC. If these settings are not visible, change the filter in the Build Settings bar from Basic to All.
Everything was fine in Xcode 4. However, when I open my project in Xcode 5, I see the following warning in the issue navigator:
Validate Project Settings
Update to recommended settings
When I click the warning, Xcode takes me to my project settings and displays a popup with 'Cancel' and 'Perform Changes' buttons, and the following description of the change it wants to make
Project 'Your Project' - Automatically Select Architectures
Project 'Your Project' overrides the Architectures setting. This will remove the settings and allow Xcode to automatically select Architectures based on hardware available for the active platform and deployment target.
I tried clicking 'Perform Changes' and letting Xcode do whatever it wanted to do, and the app still built fine for the simulators. However, when I tried plugging in an iPhone 5 (which supports ARMv7S) and running on it, the app failed to build with the following linker error:
Ld /Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/Debug-iphoneos/Your\ App.app/Your\ App normal armv7s
cd "/Users/macmini/Documents/Your App"
setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
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 -arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/Debug-iphoneos -F/Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/Debug-iphoneos -F/Users/macmini/Documents/Your\ App -filelist /Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Intermediates/Your\ App.build/Debug-iphoneos/Your\ App.build/Objects-normal/armv7s/Your\ App.LinkFileList -dead_strip -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.1 -framework SystemConfiguration -framework MapKit -framework QuartzCore -framework OpenGLES -lz -licucore -lc++ -framework ImageIO -framework GLKit -framework CoreText -framework CoreLocation -framework AVFoundation -framework CoreData -framework UIKit -framework Foundation -framework CoreGraphics -framework GoogleMaps -Xlinker -dependency_info -Xlinker /Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Intermediates/Your\ App.build/Debug-iphoneos/Your\ App.build/Objects-normal/armv7s/Your\ App_dependency_info.dat -o /Users/macmini/Library/Developer/Xcode/DerivedData/Your_App-bmrouudjlblpafdjzhpwcuekzgwu/Build/Products/Debug-iphoneos/Your\ App.app/Your\ App
ld: file is universal (2 slices) but does not contain a(n) armv7s slice: /Users/macmini/Documents/Your App/GoogleMaps.framework/GoogleMaps file '/Users/macmini/Documents/Your App/GoogleMaps.framework/GoogleMaps' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Once I reverted the automatic changes Xcode had made, my app compiled fine for iPhone 5 again - but of course I had the warning back.
How can I satisfy Xcode and get rid of the warning while still allowing my app to build successfully for iPhone 5?