Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.4 - Unable to run project

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.

like image 631
Jarada Avatar asked Jul 26 '12 16:07

Jarada


4 Answers

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

like image 56
Martin Lockett Avatar answered Sep 23 '22 05:09

Martin Lockett


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.

like image 40
morksinaanab Avatar answered Sep 20 '22 05:09

morksinaanab


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.

like image 45
LetBulletFlies Avatar answered Sep 19 '22 05:09

LetBulletFlies


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

like image 39
Jarada Avatar answered Sep 20 '22 05:09

Jarada