Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode pain, syntax highlight broken [duplicate]

I've had problems with Xcode 4 (4.3.1 - 4E1019).

After a few hours maybe less, my code isn't highlighting correctly, it seems Xcode loses all sense of Cocoa and I end up with the example screenshot, I can't jump to methods (by clicking on a method holding down cmd key) - this should work as expected and it doesn't even work for the Cocoa base classes.

The only way I've found to sort this out is to go to Organizer > Project and delete the projects derived data, then Quit and relaunch Xcode, but it's not long before it goes wrong again.

Has anyone else had this problem ? It's really slowing me down. If anyone has any tips, that would be great.

enter image description hereenter image description here

like image 844
Daniel Avatar asked May 11 '12 17:05

Daniel


1 Answers

Justin Boo pointed me to the best thread and although there are many votes and answers, the user who asked that question seems to have abandoned stack overflow.

I won't attempt to duplicate the best answer other then resume in a paragraph:

Xcode got confused with all my common headers declared in the .pch file, and the setting "Precompile Prefix Header" in Build Settings meant that Xcode was getting into some internal conflicts due to recursive imports of frameworks. So change that setting to NO.

So to keep things tidy, here's a link to the true answer that had me in a headlock: https://stackoverflow.com/a/6033009/662605

like image 175
Daniel Avatar answered Oct 04 '22 18:10

Daniel