This seems like another issue with Xcode and a complex chain of static analyzer and compiler tools.
Openradar lists the radar: // 21362856 - The Objective-C high-speed connection is unreliable . I am sure there are more, but I stopped looking after one of the examples.
The author imarcelv notes in the description:
I asked a Swift engineer at WWDC in the laboratory, and even he did not know how to fix this problem.
Playback steps:
- Add ramdom Swift class to Objective-C project
- Add the #import file "ModuleName-Swift.h", which Xcode automatically generates.
- Try using it or just try to compile the project
- It just doesn't work from time to time
It is probably best to record a radar on this issue, as it seems that others are already causing it.
Another thing you could try ...
Historically, Xcode has completely lost syntax highlighting, and you can always find out which files the static analyzer refused by increasing the level of the clang log.
I'm not sure how relevant this is, but if I were in your place, I would try this command:
defaults write com.apple.dt.Xcode IDEIndexingClangInvocationLogLevel 3
This creates logs that you can search with Console.app for xcode only to highlight messages. You will want to destroy the received data of your project in order to make it recompile things.
Although this is not the same problem as you, I had this post on the syntax highlighting issue noted for many years for the above defaults write command, try at such times.
source share