Reputation: 19662
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.
Upvotes: 29
Views: 26976
Reputation: 93
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.
Upvotes: 1
Reputation: 1013
I have solve the problem using the below steps.
it is working fine..
Upvotes: 6
Reputation: 483
Just need to select the compiler LLVM in
Targets --> Build Settings --> Build Options
Upvotes: 1
Reputation: 2360
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.
Upvotes: 25
Reputation: 1421
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)
Upvotes: 0
Reputation: 9913
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!
Upvotes: 1
Reputation: 1357
Also you need to select the compiler LLVM in
Project --> Build Settings --> Build Options
Upvotes: 43
Reputation: 6197
Make sure the bundle name (in plist file) is same as the project name. I changed it and it worked.
Upvotes: 3
Reputation: 409
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.
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.
Upvotes: 0
Reputation: 55
You just goto Build setting Then valid architecture Replace armv7 armv7s instead of armv7 .Then it will work fine .
Upvotes: 0
Reputation: 1478
remove info.plist refrence. And then re-drag info.plist to proj but don't copy to "target"
Upvotes: 0
Reputation: 11
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..
Upvotes: 1
Reputation: 1238
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! :)
Upvotes: 9
Reputation: 1424
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.
Upvotes: 0
Reputation: 21
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.
Upvotes: 2
Reputation: 19662
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.
Upvotes: 0
Reputation: 6626
You need to add armv7s to your valid architectures under your Target's Build Settings.
Upvotes: 10