Since the last update to XCode 8.1 (Build 8B62), I have had strange problems with syntax highlighting / code completion due to preprocessor macros.
They worked great with the Xcode 8 GM seeds that I used before the upgrade, but now Xcode does not recognize the correct target when choosing a schema. For example, I have a static controller library with two goals - one for iOS, the other for Apple Watch. In each I use a macro (APP / WATCH) for specific platform operations. But when I am in the target APP, the Xcode editor highlights the code as if it were the WATCH target, while the actual code for this purpose does not have highlighting or automatic completion. Xcode seems to accidentally detect macros from different targets. The compiler, on the other hand, always detects the correct code and works 100% perfectly, so there is nothing wrong with the code. This is just an editor.
Also, when I start Xcode, the code is highlighted for about a second, and then again gets all the white text. Deleting and reading all the schemes did not work, cleaning and deleting Derived Data also did not affect this. Anyone who has the same problem or even a solution to this?
EDIT: I played around a bit with goals and macros, and I found that Xcode only accepts macros from one target and discards all the others, no matter which target is selected. Any help?
source share