Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 4.5.2 errors are found but Build is marked as Succeeded

This problem is very similar to this one: Xcode 4 Preview 4 displays "Build Succeeded" but with errors

The different solutions proposed at the link doesn't work. I tried using product clean, deleteing the Derived Data, restart XCode and the Mac, but the problem still appears.

It seems that all the error are linked to the project's precompiled header : although the PCH is working fine and has no error in itself, the errors reported look like the pch is not found for this specific file. Also sometimes, while the build progresses, the errors appear and disappear randomly. Anyone have an idea on this?

enter image description here

The error only appear in the file(s) opened in the editor. If I close the file's in xcode but keep the project open, then no error are reported at all.

like image 252
XGouchet Avatar asked Dec 19 '12 14:12

XGouchet


4 Answers

Cleaning, closing, restarting - none worked for me.

A simple touch/edit to the pch file in question resolved the issue.

like image 107
kball Avatar answered Oct 17 '22 17:10

kball


Have you tried cleaning the build folder?

In XCode, open the Product menu then hold down option. Clean should change to Clean Build Folder.

Edit:

You can also press + + + K

like image 25
Lance Avatar answered Oct 17 '22 17:10

Lance


I had this same issue, and neither types of cleans helped. I also tried deleting the build folder, restarting xcode, etc and for me what finally solved the issue was to remove the files that the errors referenced and re-add them.

Additionally, I investigated the error after the fact, and the issue seems to be XCode's "Show Live Issues" feature. (This can be unchecked in the preferences, this also solved the issue but was unsatisfactory as a solution as I've grown to enjoy xcode's live code sense.)

like image 5
hatunike Avatar answered Oct 17 '22 18:10

hatunike


Cleaning the product folder and restarting didn't help me. I started seeing this after I deleted the DerivedData folder. I was able to "fix" by doing :

  1. Clean build.
  2. Archive
  3. Build
like image 2
Mustafa Avatar answered Oct 17 '22 19:10

Mustafa