Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.2 Product -> Run Greyed Out

Tags:

My "Run" button under "Product" is greyed out and after trying a few things from various forums, can't figure out what's gone wrong.

I've tried removing the project.xcworkspace and xcuserdata files and letting xcode generate new ones, but no...

My co-worker uses AppCode from IntelliJ and when he pulls the code, it runs just fine. But if he opens the same files in his Xcode, his "Run" is also greyed out.

like image 286
FishStix Avatar asked Nov 16 '11 01:11

FishStix


People also ask

Why is archive grayed out in Xcode?

You can not archive, because from target you have not selected device or Generic iOS device or Any iOS Device , still there is a simulator.

Where is the Run button on Xcode?

Building and running your Xcode project The left-most button is the run button. This will build and run your application and launch your app in the iOS Simulator.

How do I run code in Xcode?

To compile and run your program, click the run button in the top left corner of the window. When your program runs, XCode will open an output pane. You can see any output that your program generated in that pane.

Why can't I archive in Xcode?

If you can't create an archive in Xcode, usually it's because you have the destination set to the simulator. Switch to an iOS device (it should work even if you don't have one connected).


2 Answers

"Edit" your current "Scheme":

enter image description here

Make sure you have "Run" checked for that build target:

enter image description here

like image 149
chown Avatar answered Sep 28 '22 01:09

chown


The scheme need to be fixed (I don't know why xcode changed it)
Here are the required steps:
Goto project, Edit Scheme..., Change executable

like image 22
ShaulF Avatar answered Sep 28 '22 02:09

ShaulF