Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4: Build Failed, No Issues

I've been getting 'Build Failed' with no errors in the Issue navigator(only warnings). Report navigator, though, displayed errors correctly.


Are you using "Underscore" and "Space", etc. for Bundle identifier?

Are you using .m instead of .h in one of your imports? #import "Photo.h"


The first thing I'd try is to clean everything (menu Product / Clean) and the build it again. You might have already tried it.

You'll find (and you can watch during the build) the complete build output in the Log Navigator. That's the right most icon of the small icons just below the Run and Build buttons.

The build (and debug) log files are found in the directory /Users/you/Library/Developer/XCode/DerviedData/YourProject-abcdefg/Logs/Build (and ../Debug respectively).

I don't think there's any output for the installation of your app on the device.


Is there a space in your Target's Product Name?

I know that in earlier versions of Xcode this was no problem, but it seems that they broke something in Xcode 4 so it doesn't work any more (I suspect it's something to do with the DerivedData path nonsense). You can add a space to the name of your app as it appears on the Launchpad of your iDevice by setting the CFBundleDisplayName key in the Info.plist to something other than ${PRODUCT_NAME}.


On one of the local Cocoa Heads mailing lists I was encouraged to attempt a small default sample project - something I should have done in the beginning to make sure my provisioning and signing worked. It built and ran on my device without issue, so all signs point toward a problem with my code or the project.

I'll be throwing things from the existing project into the new sample project, and if it fails in a similar way I should be able to narrow the problem down to a smaller region of interest.


I've added the main functionality of the app into a new project, and it's running fine. The only things I did differently this time was I did not set up a universal binary (iPhone only right now) and turned off all but portrait orientation. As far as I can tell everything else is the same, though if I decide to look into it further later I will diff the project files and see what else might be different.

So the solution for me was to start a new project a port all the functionality from the old project into the new project.

It could be that recreating the target, as Paul suggests in another answer, would fix it as well, but with such a simple project restarting from scratch was easy for me.