Xcode 4: Build Failed, No Issues

IosXcodeBuildXcode4

Ios Problem Overview


The app works fine in the simulator, builds and runs.

When I attach my device (iPhone 3GS running iOS 4.3) and target the iPhone, the result is "Build failed" with "No issues".

Looking at the build results window, everything is green, has a checkmark, including the Build failed notice.

Expanding the transcripts show no errors.

I cannot exclude the possibility of a signing or provisioning error, but it gave me those errors, I ironed them out, and now it's not giving me any errors or issues, just "Build failed; No issues"

  • In what ways can the build fail with no issues?
  • Is there a way I can watch the build output to see if I can find the reason it's failing with no issues?
  • Is there build output produced beyond the issues list?
  • I don't see on the build window where it attempts to load the app onto my device - is this output elsewhere?

Ios Solutions


Solution 1 - Ios

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

Solution 2 - Ios

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"

Solution 3 - Ios

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.

Solution 4 - Ios

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}.

Solution 5 - Ios

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.

Solution 6 - Ios

I had the same problem, and like someone else suggested it had to do with the bundle identifier. I had recently changed it, as a test, and had put an asterisk in it. I fixed that, and had to clean the target, and then it worked.

Solution 7 - Ios

This happened to me after deleting an unused target. It seems that Xcode put a space in my remaining target's CFBundleIdentifier (com.company.etc). I had to edit Info.plist with an external text editor to remove it and then it worked fine.

Solution 8 - Ios

I was just playing with adding multiple projects inside a workspace and got this problem. I have a simple library in one of the projects and I was building and I added an iOS window based target to test it. I deleted the first target I made for this to rename it. After reading this I tried removing xcuserdata from inside the .xcodeproj package and that fixed my problem. I hope this helps someone else. Running Xcode 4.1 on OS X 10.7.1.

Solution 9 - Ios

After going though all these answers, I had the exact same issue, but something different solved it for me.

The Problem:

Build failed without issues after refactoring. (Renamed a class using Edit -> Refactor -> Rename).

The Dumbest Solution Ever:

Go refactor (rename) something else (-_-"). After doing that, the error was that Xcode failed to rename all appropriate files, and didn't show errors. Then, after another refactor, the errors from the previous refactor appeared.

Solution 10 - Ios

I had this same problem. I was trying to fix it a xcode crashed. I reopened it and it worked just fine. Maybe I was lucky or something? Whatever, I don't really care what was wrong with it as long as it works now

Solution 11 - Ios

If you changed bundle identifier and cleaned project, but it also didn't work, try to empty /Users/YOUR_USERNAME/Library/Developer/Xcode/DerivedData directory.

It works for me.

Solution 12 - Ios

For me, the build failed without displaying any errors in the Issue Navigator. However, in the Log Navigator, in that build session, I could see the error. In my case, the error was an undeclared constant. I imported the required header file and the problem was resolved. I am not sure, why this error did not show up in the Issue Navigator.

I tried to reproduce this behavior by deliberately changing the name of another variable. This time, the error was displayed in Issue Navigator. So, I am still unsure about why wouldn't the earlier error show up in the Issue Navigator.

Hope this helps.

Solution 13 - Ios

The above solutions do not work for me.

My solution is to move the project to another folder.

The build errors then just appear as normally did.

Solution 14 - Ios

Have you cleaned your build folder? Go to the Product menu, hold down the Option key, and select "Clean Build Folder…"

Solution 15 - Ios

I know what the problem is: In Info.plist -> Bundle Identifier: you can not use '_'. For example, com.mycompany.My_app is not valid, but com.mycompany.My-app OK.

Solution 16 - Ios

Same problem here when building for device. Build failed, but my log all is green checkmarks. Cleaning/deleting build folder doesn't fix it. I read elsewhere that someone solved this problem by deleting and recreating the target, but I haven't completely figured out how to do that yet in XCode 4.


My temporary solution has been to download and install XCode 3.2.6 w/iOS 4.3. I didn't realized that Apple had also released a version of XCode 3 that includes iOS 4.3, allowing you to postpone the upgrade to XCode 4. I filed a bug report with Apple about the Build Failed issue.


udpate from Apple:

>When we build this project - albeit on a post-Xcode 4.0 version - we see the following in the ProcessProductPackaging step in the build log: > (null): error: CFBundleIdentifier 'com.yourcompany.Magic_Carpet' contains illegal character '_' invalid bundle identifier 'com.yourcompany.Magic_Carpet' > The ProcessProductPackaging code got an overhaul fairly recently, so we suspect it just wasn't emitting errors properly in Xcode 4.0. Take a look at the transcript of your own build, and if so, then this will likely be fixed in a future release of Xcode (we cannot comment further until a fix has been released).

I switched from an underscore to a dash and it fixed the problem.

Solution 17 - Ios

I had exactly the same problem when trying to compile an existing project in xcode 4, and very nearly went through the pain of recreating the project.

However, in a last ditch attempt I replaced the info.plist file with a newly created one which included the additional tags for "document types", "url types", "Exported Type UTIs" and "Imported Type UTIs"

This seemed to work and was a surprisingly simple fix for my project.

Solution 18 - Ios

This happened to me with my UnitTest target. Was working and then stopped. I'd forgotten i'd just deleted a .h/.m on the file system and not removed it from the project file, however XCode didn't report it.

I figured it out by running the project on the command line, which told me the error:

/usr/bin/xcodebuild -target "UnitTest"

Run this in the folder you have your project file, and replace UnitTest with your target - or just don't pass in a target to build the default target.

Solution 19 - Ios

I had this problem too, but the cause was a different one:

I have a workspace with one project in it. In this project I use a framework which is included by adding it's Xcode project to my project. I imported the framework's header file in my prefix header (.pch). This was stupid.

The solution was to remove the #import of the framework header file from my prefix header file and add it only where needed.

Solution 20 - Ios

Same thing just happened to me with a different cause.

I removed get-task-allow from my Entitlements.plist file, leaving an empty plist. Build settings still had Entitlements.plist file specified as my Entitlements file. Chose to run using my Ad-Hoc build settings on iOS device with my iPhone connected, and saw the behavior described in this bug. Adding get-task-allow back fixed it.

Solution 21 - Ios

seems like there are many possible causes of this problem. Mine turned out to be that

My target was set to use a non-existent provisioning profile.

I set my project to use a new profile, and I deleted the old one. Didn't realize that the target had its own provisioning profile setting, which was still set to the old (now deleted) profile.

Solution 22 - Ios

Just to add another answer after trying ALL the above without success: I had to restart the MacBook, not only close XCode, and that worked for me. It ended up with XCode showing some errors in the Localizable.strings that it didn't show before.

Hope that helps

Solution 23 - Ios

i clear all Spaces in project schemas in xcschemes and this resolve this issue. F***ing Apple :( AppCode ROCKS!

Solution 24 - Ios

see: http://developer.apple.com/library/ios/#DOCUMENTATION/FileManagement/Conceptual/understanding_utis/understand_utis_conc/understand_utis_conc.html

> The UTI Character Set A uniform type identifier is a Unicode string > that usually contains characters in the ASCII character set. However, > only a subset of the ASCII characters are permitted. You may use the > Roman alphabet in upper and lower case (A–Z, a–z), the digits 0 > through 9, the dot (“.”), and the hyphen (“-”). This restriction is > based on DNS name restrictions, set forth in RFC 1035. > > Uniform type identifiers may also contain any of the Unicode > characters greater than U+007F. > > Important: Any illegal character appearing in a UTI string—for > example, underscore ("_"), colon (":"), or space (" ")—will cause the > string to be rejected as an invalid UTI. At the API layer, no error is > generated for invalid UTIs.

Solution 25 - Ios

I had no problem with name of the bundle so suggested solutions didn't work for me. Finally I have set Don't code sign for the build, then I closed the project, then removed provisioning in organizer, then downloaded new provisioning and add it to organizer, then set them for the build. It worked.

Solution 26 - Ios

This is not a technical answer, but a "user error" answer that probably does not apply to your situation. It happened to me and my search lead me to this Q&A to no avail --- until I realized my mistake. I had a filter set in the Issue Navigator that did not match anything that was being reported as an issue. When I cleared the filter, the issues were displayed.

Notice the symptoms were the same as you were asking about and I have no idea when I set that filter (it must be inherited from the other navigation views) as I would not have needed any filtering on the short list.

Solution 27 - Ios

I just had a similar problem. Could not find an error anywhere. Deleted all my provisioning profiles and added new ones.

Then I tried building another test app to my device and I got this error message:

Code Sign error: Certificate identity 'iPhone Developer: xxxxxx' appears more than once in the keychain. The codesign tool requires there only be one.

So I went into Keychain, found a couple of expired certificates with the same name, and deleted them, and that did the trick.

Pretty random, but perhaps if you try building another app to the device like i did, you might be lucky enough to get an error message, as i did, to help diagnose the problem.

Solution 28 - Ios

Go to Organizer in xcode. And in Project Tab, delete that project. Let xcode rebuild the derived data again fix my problem.

Solution 29 - Ios

I was programming an Mac OS X application without codesigning. When I enabled sandboxing in the "Entitlement" section, codesigning automatically switched on and I couldn't make a new build.

Solution 30 - Ios

In my case, the reason was that one of my Localized string had no ; in the end: So, "You’ve already passed the test" = "Тест по этому слову уже пройден" with no ; in the end brings to Build Failed with no issues.

Solution 31 - Ios

Check for Spaces in the name. Not only of your target(s) name(s), but also build schemas as well. For me removing spaces did the trick.

Solution 32 - Ios

I had a similar problem to this and the fix was removing the camel case naming of the project name.

Solution 33 - Ios

I had the same problem and I fixed it by adding a missing include used for a macro defined in the prefix file.

I have this macro defined in the prefix file:

#define ApplicationDelegate ((tdAppDelegate *)[UIApplication sharedApplication].delegate)

but in the file that I used I forgot to include the file "tdAppDelegate.h" ;)

Solution 34 - Ios

I faced similar problem in XCode4.5 and while working on my application XCode suddenly crashed.

After searching for hours, I found out one of my file in my application got deleted when xcode crashed.

I restored the file from Trash and issue got resolved.

Solution 35 - Ios

I found that i was missing a Framework. I used the MFMailViewController and I added a reference to

 MessageUI/MessageUI.h

but I inadvertantly forgot to add it to the project... Incase you dont know how to add a framework to a project:

Double Click on the Project Name in Project Navigator --> Select Build Phases --> Expand the Link Binary with Libraries tab You will see a + and -. Select + for adding a framework. Type in the name you are wanting to add and when you see it, click on it and click on ADD.

Solution 36 - Ios

Just tried everything in this post and nothing worked.

Then went Apple menu > Software update > spotted there was an xcode update.

I havent installed the update yet but simply keeping this window open resolves the issue (when I close the upgrade window the issue re-occurs).

I guess this must be kinda rare, but hopefully it will solve the issue for some.

Solution 37 - Ios

In my situation ,It's my coding compile problem. but XCODE don't make the compile error remind.

Solution 38 - Ios

If your Xcode project contains subprojects, try closing the parent project and opening the child Xcode project directly.

My subproject had an error, but it wasn't showing in the parent project's error list when I built the subproject's target. But when I opened the single Xcode project and built the same project, the error appeared.

Solution 39 - Ios

My mistake was accidentally typing a letter in line 1 of my main.m file and accidentally saving it.

I was about to lose hope and migrate my code to a new project until I accidentally opened my main.m file in Finder. Too bad the compiler didn't see that error.

Solution 40 - Ios

For me was a deprecation in the JSONKit Library. It was accessing to the isa property of an object which is deprecated, we must use object_setClass() instead.

Solution 41 - Ios

Xcode 6.1

My problem was leaving error in one .m file, then going to another and closing Xcode without fixing the error in the first .m file. After I opened Xcode again, the error was not showing until I went to the first .m file. Then it showed up without any interventions.

Solution 42 - Ios

I was using one macro from the file which was not imported, after importing that file problem solved.

Solution 43 - Ios

FOR me i checked the hidden(not listed) issues by Product -> Analyze. All the hidden bugs will be listed if Analyze fails

Solution 44 - Ios

For me this started to happen after I added the line: "~Documents" in: Build Settings -> Header Search Paths.

After I removed it the the debugger started working again.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAdam DavisView Question on Stackoverflow
Solution 1 - IosMercurialView Answer on Stackoverflow
Solution 2 - Iosuser674180View Answer on Stackoverflow
Solution 3 - IosCodoView Answer on Stackoverflow
Solution 4 - IosdamianView Answer on Stackoverflow
Solution 5 - IosAdam DavisView Answer on Stackoverflow
Solution 6 - IosCortisView Answer on Stackoverflow
Solution 7 - IosAbePralleView Answer on Stackoverflow
Solution 8 - IosAndrewView Answer on Stackoverflow
Solution 9 - IosMazyodView Answer on Stackoverflow
Solution 10 - IosPorterView Answer on Stackoverflow
Solution 11 - IosKenialView Answer on Stackoverflow
Solution 12 - IosSreejitView Answer on Stackoverflow
Solution 13 - IosHai Feng KaoView Answer on Stackoverflow
Solution 14 - IosJon ReidView Answer on Stackoverflow
Solution 15 - IosRubyconView Answer on Stackoverflow
Solution 16 - IosPaul SlocumView Answer on Stackoverflow
Solution 17 - Iosuser696455View Answer on Stackoverflow
Solution 18 - IosbandejapaisaView Answer on Stackoverflow
Solution 19 - IosCodeStageView Answer on Stackoverflow
Solution 20 - IosColinView Answer on Stackoverflow
Solution 21 - IosCharlieMezakView Answer on Stackoverflow
Solution 22 - IossonxurxoView Answer on Stackoverflow
Solution 23 - IosBimawaView Answer on Stackoverflow
Solution 24 - IossfjavaView Answer on Stackoverflow
Solution 25 - IosEngeorView Answer on Stackoverflow
Solution 26 - IosmobibobView Answer on Stackoverflow
Solution 27 - IosmestevieView Answer on Stackoverflow
Solution 28 - IosAccBLueView Answer on Stackoverflow
Solution 29 - IosGit.CoachView Answer on Stackoverflow
Solution 30 - IosNikita PestrovView Answer on Stackoverflow
Solution 31 - IosEugene BraginetsView Answer on Stackoverflow
Solution 32 - IosZenBalanceView Answer on Stackoverflow
Solution 33 - IosjavikrView Answer on Stackoverflow
Solution 34 - IosniksView Answer on Stackoverflow
Solution 35 - IoslogixologistView Answer on Stackoverflow
Solution 36 - IosCharlie SeligmanView Answer on Stackoverflow
Solution 37 - IosfrankView Answer on Stackoverflow
Solution 38 - IospkambView Answer on Stackoverflow
Solution 39 - IosacecapadesView Answer on Stackoverflow
Solution 40 - IosLolloz89View Answer on Stackoverflow
Solution 41 - IosVolenDView Answer on Stackoverflow
Solution 42 - IosMohammad Zaid PathanView Answer on Stackoverflow
Solution 43 - IosDanbozView Answer on Stackoverflow
Solution 44 - IosEran TalmorView Answer on Stackoverflow