Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why doesn't Xcode 4 create any products?

Tags:

xcode

ios

xcode4

Regardless of build configuration, building my iPad app does not actually output a .app file. It does run in the iPad simulator and on a device, but when I hit build or build and run, the binary appears under Products in red and is not created in the "build" folder as designated in build settings.

Any ideas?

like image 419
Tiki Avatar asked Mar 16 '11 20:03

Tiki


People also ask

Why is Xcode not building?

Clean Your Project Cleaning your project is one of the easiest ways to fix your Xcode build. This can be achieved by going to Product > Clean Build Folder . Or by using the keyboard shortcut Cmd + Shift + K. Xcode will begin to clean your build folder - this might take a couple of minutes.

How do I create a project in Xcode?

Launch Xcode, then click “Create a new Xcode project” in the Welcome to Xcode window or choose File > New > Project. In the sheet that appears, select the target operating system or platform and a template under Application. In the following sheets, fill out the forms and choose options to configure your project.

Where is the products folder in Xcode?

It should by located in: ~/Library/Developer/Xcode/DerivedData .


2 Answers

Xcode 4 places its build products and other intermediaries/temporary files/indexes in a derived data directory now instead of a "build" directory that is mixed in with your product files. It does this to deal with the new workspaces and also so that you can have clean builds of different projects in different workspaces without contaminating each other.

If your original template was old, your built product is probably relative to your source directory instead of relative to your built products directory, which is why it's showing up red. By default, your derived data directory will be under ~/Library/Developer/Xcode/DerivedData. To see where your current workspace/project is placing these files, you can File->Workspace Settings... and take a look at the Build Location.

like image 107
Jason Coco Avatar answered Oct 13 '22 04:10

Jason Coco


I was having this problem. not only the product .app was red, also simulator wasn't loaded the binary, it was stuck in attaching 'my app'. i solved it by going to file->project settings. in the tab 'build' changed derived data location to 'project-relative', and in advanced changed build location to 'locations specified by targets'. with the default options it wasn't possible to run the app, i'm not sure why.

like image 36
Alexander Fradiani Avatar answered Oct 13 '22 06:10

Alexander Fradiani