Xcode Broken Syntax Coloring

Xcode often seems to lose consciousness and does not stain system code classes or does not provide the correct "code hints". This is endlessly frustrating. A question was asked in at least three other cases:

Xcode syntax highlighting issues

xcode coding code color code not working

Xcode: code loses syntax coloring

I switched to the project version on / from 3.1 compatible and 3.2 compatible, completely restarting Xcode before and after each change without effect.

I rebuilt the code sense indices and completely restarted Xcode without any changes.

I built my project to make sure there were no errors and restarted.

I copied my files (sans.svn files) to another place - the same problem.

I already completely turned off the placeholders argument because they screw my documents when I type too fast ... all I ask is for the esc key to display the correct list of properties and methods.

+6
objective-c xcode
source share
2 answers

For everyone; my application has some precompiled directives:

#if ... 

It turns out that an error has occurred in one of these sections.

I assume that my application is built perfectly because these sections were deleted before they ever got into the compiler ... but CodeSense doesn't care about that (it still wants to color everything in them) - that's why CodeSense is out of for errors, because of an error, even if I did not find it when I tried to create an application.

As soon as I fixed the error in this block of code, my coloring returned.

It would be nice if Xcode simply crossed out these sections instead of dying.

+7
source share

You must clear the data received from the project. They are probably spoiled.

Go to Organizer> Projects> Custom> Derived Data> Delete

Xcode is reindexing your project, and you should get back to normal.

+12
source share

All Articles