Since the latest XCode update 8.1 (Build 8B62) I'm having strange problems with syntax highlighting/code completion in connection with preprocessor macros.
They worked just fine with the XCode 8 GM seed which I have been using before the update, but now XCode does not recognize the correct target when selecting a scheme. For example, I'm having a controller static library with 2 targets - one for iOS, the other for Apple Watch. In each I use a macro (APP / WATCH) for platform specific operations. But when I'm in the APP target, Xcode editor highlights code as if it is the WATCH target whereas the actual code for this target has no highlighting nor auto completion. Xcode seems to randomly detect macros from different targets. The compiler on the other hand always detects the right code and works 100% fine, so there's nothing wrong with the code. It's just the editor.
Also when I start up Xcode the code gets highlighted for about a second and then gets all white text again. Removing and readding all schemes didn't work, cleaning and deleting Derived Data also has no effect on this. Anyone having the same problem or even a solution for this?
EDIT: I played around with targets and macros a little and I found that Xcode takes only macro from one target and discards all others, no matter what target is selected. Any help?