2

I've been having this problem for a couple weeks now. All of a sudden this happened to my project and I havent been able to fix it. Its a basic tab-bar app and i've barely even started heavy coding on it. Running xcode 4.6.2 (tried on 4.6 and 4.6.1 also).

The actual error says: "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."

Thanks in advance.

  • So did you try changing the destination? Or the architecture? Or maybe try a google search? – matt Apr 16 '13 at 02:48
  • possible duplicate of [Xcode Cannot Run on the Selected Destination](http://stackoverflow.com/questions/11767945/xcode-cannot-run-on-the-selected-destination) – matt Apr 16 '13 at 02:48
  • 2
    not that simple @matt. and the only reason i made my own post, is because the other answers failed to solve the problem. – Zachary Rosenberg Apr 16 '13 at 02:50
  • Well, your question doesn't say what you've tried. Does it happen in a completely new project made directly from, say, the Single View template? If not, I would suggest just migrating into a different project. Sometimes projects do mysteriously go bad... – matt Apr 16 '13 at 03:07

1 Answers1

5

Well here's my new fix: I had (for some reason) changed the highlighted line below:

info.plist

I had changed the ${EXECUTABLE_NAME} to something else. Changing it back did not fix the issue immediately: I had to first click the + to add a new row then delete the new row.

My app runs fine now


OLD FIX:

OK, so yes, it's true, there are other questions like this one. They helped me figure out a different (and stranger) solution.

  1. I right-clicked on my .xcodeproj file and chose "Show Package Contents"
  2. I then opened "project.pbxproj"
  3. I copied all the text from it to another file, deleted all the text from it and saved
  4. This "crashed" my XCode Project that I had accidentally left open in XCode.
  5. I closed my project, then pasted the original contents of "project.pbxproj" back into "project.pbxproj"
  6. I saved "project.pbxproj" and closed it
  7. After opening my XCode Project again, I was able to run it on my device!

To me, it doesn't make sense why this worked because I didn't modify an files... But it did, so hurrah!

PS Back up your project beforehand, just in case.

EDIT: Well mine has stopped working again and I can't use the above method to fix it...

Max Chuquimia
  • 7,494
  • 2
  • 40
  • 59
  • strange fix, i tried all the stuff [here](http://stackoverflow.com/questions/11767945/xcode-cannot-run-on-the-selected-destination?page=1&tab=votes#tab-top) but none of them worked... but this answer did seem to work – Fonix Jul 25 '13 at 13:29
  • This saved the day with a demo VLCKit project (XCode 5.1.1), strange indeed! Thanks! – colin lamarre Dec 04 '14 at 11:43