Xcode 4.4 - Unable to run project

19k Views Asked by At

Having just upgraded Xcode 4.3 to Xcode 4.4, I get the following errors when running an existing project:

On the simulator: "Cannot run on the selected destination. 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."

On the device: "Xcode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device."

The funny this is, the project ran on Xcode 4.4 and the simulator for the first couple of runs and then stopped working. Have tried restarting but not reinstalling just yet, as Xcode is quite a big application and if it's just a settings problem then I don't really want to download it again from scratch.

Notes: Base SDK is Latest iOS (iOS 5.1), I'm on Lion (not Mountain Lion just yet) and my Deployment Target is iOS 4.0.

8

There are 8 best solutions below

0
On BEST ANSWER

Upgrading to Mountain Lion fixed the issue. Not sure why, but it is now working on the simulator and on the device.

0
On

I experienced exactly the same problem after upgrading from Xcode 4.3 to 4.4. Only for 1 of my iOS projects, though. My solution was to create a new project and re-add all my source, dependencies (except KIF Integration Tests, which I haven't added yet) and other custom libs. After doing so I was finally able to debug my app on my iPhone and iPod Touch.

My setup is OSX Lion and Base SDK is Latest iOS (5.1).

5
On

I had this problem and it turned out to be a spelling mistake in the product name in the build settings. Check all you product references are consistent in the settings and plists. Also check the product name does not contain a space or other "illegal" characters; this also causes the same error

0
On

Try deleting the temporary folder for the app in your Library/Developer/XCode/DerivedData folder and rebuilding.

0
On

I ran across this issue this evening after an update to OSX. The project had been running fine previously. It turned out all that was necessary was a reboot. Still scary though.

0
On

The reason I want to add is all the above could not solve this problem:

And my steps are:

  1. Uninstall ur app on the device

  2. check if the info.plist files are duplicated (which I mean there could be two same plist for the same Products)

  3. Click on your project, check the "IOS Deployment Target" under the PROJECT and all "Deployment Target" under TARGETS are the same (most of the time, at this point, u could close xcode and restart, maybe it will work after this step)
  4. If it is still doesn't work, change you "Base SDK" from Latest iOS(iOS 6.0) to iOS 6.0(under your "Build Settings") for your PROJECT and TARGETS (quit xcode, cmd-q, or force quit, and restart again)
  5. after all those steps, it should work. (if the above doesn't work, u could still copy out the project and recreate a new one, don't do it til u hv no choices)

(PS: This is a really buggy problem, actually after I fixed it, and i changed everything back, it is still working.)

Forget at what I said above, I found the real quick way to solve this problem, force quit your Xcode, and restart it again, sometimes you will need to restart you device as well. Good luck guys, really get sick of this kind of problem.

0
On

I upgrade Xcode from 4.3.2 to 4.5 this weekend and got the same issue.

in my case,

I fix it by changing project setting. Previously my project setting in Xcode 4.3.2 has an armv6 support in build - architecture. Since Xcode 4.5 drops this support, so I have to delete armv6 strings. That fix it, I can debug codes with iOS 6 device.

But when I submit the app, I have to go back to XCode 4.3.2. because marketing team in my company won't want to loose those possible minority users, in China, there are still few 4.1 and 4.2.1 existing.

so if your project ever support armv6, and encounter this unable to run project due to architecture in XCode 4.5, please have a try like me. hope can help.

0
On

I had this problem as well upgrading to 4.5 and my iPhone 4 to IOS 6

"Xcode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device."

As I already ran on Mountain Lion, I did the following

1) set the valid architectures to the armv7s & armv7

2) doublechecked the spelling of the product name

3) reinstall to xcode 4.1.1

It worked for a while, but then I got the same error again. Then I got the tip (so obvious) to

4) delete the previously installed app (for debugging) on my device.

this worked! I will now never forget to delete the app as well on my device just to be sure it gets built with the latest settings.

Update: I have retried with xcode 4.5 / ios6 and above steps do work now as well. So I can now work with xcode 4.5 and ios 6.