Xcode: code loses syntax coloring

1.) Go to Project –> Build Settings –> Header Search Paths

2.) Add “$(SRCROOT)/**”

3.) Close and reload the project

4.) Go to Xcode –> Window –> Organizer –> Projects –> $YourProject –> Delete Derived Data

5.) Wait a moment until XCode rebuild all indicies


To get more information activate verbose logging:

1.) Increase Xcode log level in Terminal app:
defaults write com.apple.dt.Xcode IDEIndexingClangInvocationLogLevel 3

2.) Open Console app. Search for “xcode”

3.) I saw “file not found” errors for header files mentioned in the pch file (therefore the fix above)

Leave a Comment