问题
So I have a brand new app I created last night for iOS6, using XCode 4.5. I can properly develop on my iPhone 4 with iOS6.
Today I got my new iPhone 5 with iOS6 and, after updating the certificates with the new device UUID, I tried to run my app on it and got this error:
XCode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device.

I've enabled the device for development. Both armv7 and armv7s are on the settings.
I have included the sources from the Facebook 3.0 SDK and the linker flag '-lsqlite3.0'. I'm guessing the issue has to be related, but cannot figure what is wrong.
Any ideas how to solve it?
PS: The issue happens too when running the app on the simulator. No idea what changed on my project or XCode between last night and today, other than I have a new device and new certificates.
The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software.
回答1:
Also you need to select the compiler LLVM in
Project --> Build Settings --> Build Options

回答2:
I have found the same issue while running an OLD project on XCode 5.0 and My solution is:
You need to do following steps for getting out with this:
1. Set Valid Architectures : armv7,armv7s
2. Set compiler as LLVM in Project ---> Build Settings ---> Build Options.

3. Set Base and Deployment sdk properly.
This is my solution. Happy To Help.
回答3:
You need to add armv7s to your valid architectures under your Target's Build Settings.

回答4:
You included src/Framework/Resources/Info.plist
when added Facebook SDK files to your project. Just remove it from your project and everything will work again. Guaranteed! :)
回答5:
I have solve the problem using the below steps.
- Close the Xcode
- Delete the application from device
- Restart the device
- then re-run the application
it is working fine..
回答6:
Make sure the bundle name (in plist file) is same as the project name. I changed it and it worked.
回答7:
One of my 3rd party libraries couldn't run on armv7s so I removed that option. I also removed armv6 and kept armv7 as the only option. It built and ran on the phone with only armv7.
回答8:
I have solve the problem using the below steps.
Close the Xcode Delete the application from device Restart the device then re-run the application it working fine..
回答9:
I faced this problem because Build settings-> Complier for C/C++/Objective c
was set wrong.
So I changed it to default compiler available, it worked!
回答10:
Just need to select the compiler LLVM in
Targets --> Build Settings --> Build Options

回答11:
I ran into the same problem. When I check the compiler it is showing incompatible compiler. you need to make it valid one. To set valid compiler follow the steps
select your
project----> build settings-->
on the search bar type compiler and search now you can find build options under build options you will find compiler for c/c++/objective c set it to valid one.

回答12:
So basically I created a new project, copied all the sources and everything seems to work fine. At least the app runs.
I am not sure which setting was causing the problem.
回答13:
I had an issue with an out of data library that was built for iOS 4.x and I was building a new app for iOS 6 with iPhone 5 support. I received this error and the only way I resolved it was to make armv7 the only architecture and valid architecture listed in my project and target build settings.
回答14:
remove info.plist refrence. And then re-drag info.plist to proj but don't copy to "target"
回答15:
You just goto Build setting Then valid architecture Replace armv7 armv7s instead of armv7 .Then it will work fine .
回答16:
Ok, not sure if this is the Problem in Your Project. But what fixed it for me, was to change the Name of the Info.plist File.
- I changed the name from Info.plist to my-project-info.plist
- also change it under target-build-settings/Packaging/Info.plist
- Than delete the App from Devices/Simulators and re-run the App through Xcode
In my Case, everything worked fine since than. In my Case there was nothing wrong with the specifications made in the plist file or with the valid architectures.
回答17:
some times this happens when your project was build in xcode 4.5 and you are trying to run in xcode 5.0. so in my case I found the solution.
Change your compiler for C/C++/ObjectiveC Go to Build
Settings->Build OPtions->compiler for C/C++/ObjectiveC; select Default(Apple LLVM5.0)
来源:https://stackoverflow.com/questions/12540534/xcode-4-5-4g182-iphone-5-ios6-choose-a-destination-with-a-supported-archit