syntax highlighting broken in xcode 11?

Seems like < 50% of my code has syntax highlighting now. Anyone find a work around?

Replies

Could this help, by deleting some derived data ?


h ttp://blog.ericd.net/2018/01/31/xcode-9-lost-syntax-highlighting-and-autocomplete/


quote:

Have you ever been working on a project, and then one day your syntax highlighting is gone? Your autocomplete is generating almost nothing useful? This trick saved me from bouts of madness.


  1. Quit Xcode
  2. Finder > Go (hold down the Option key while Go is selected – this will cause Library to pop up)
  3. Select Library
  4. Developer > Xcode > Derived Data
  5. Find the folder that has your app name & a jumble of characters behind it, i.e. “MyApp-dfwdfdfakjakjaka”
  6. Delete the folder.
  7. Launch Xcode and open your project
  8. It will be re-indexed and you’ll see a folder pop back into your Derived Data folder for the project.
  9. You should be good to go.
  • Thank you! Worked.

Add a Comment

First thing I tried and didn't help. Thanks though.

Yes, syntax highlighting is badly broken in Xcode 11. Randomly code is not or wrongly highlighted.


It does not help you but it confirms that the problem is not on your side.

I'm seeing issues with all my Objective-C code in a mixed solution

The mixed project of Object-C and swift often appears
In my case a cause of the problem was second structure created with a name of existed structure, but located in a different group folder.
It is weird, but XCode didn't provided an appropriate description on that problem.
Cache cleans didn't help.
The problem was localised after the first build run where structure names duplication was outlined.

The bug exists in Xcode 12.5!!!!!

  • The syntax highlighting doesn't seem to update until I build the project. What gives?

Add a Comment

I remember this bug exists since Xcode 4! And still happening at 12.5.1. There's no way to reproduce it, just happens usually after a time working in the project. The more files a project has, the more often this happens.