Learn Courses My Dashboard

How to fix missing Syntax highlighting / Auto Completion?

Xcode behaves very unreliable sometimes. For whatever reason. Then there’s no syntax highlighting. Only white color characters. Auto completion doesn’t work too, which is especially problematic. Who knows all these methods names and arguments by heart and correctly?

I have already tried ctrl + b and close / reopen the project in such situations. Nothing helps sometimes.

Is there a way to solve the issue? A way, which works in any case?

If you have an error in your code then Autocomplete wont work. What you have to do is remove the code causing the error (or comment out sections of code to isolate where the error may be) and then gradually add your code back.

Sometimes it can be as simple as a period missing in front of a modifier and the complier fails to identify that but in the meantime autocomplete just does not “play the game” as it were.

I often make use of cleaning the build folder (Shift + Command + K) which can itself be a nuisance especially when 3rd party libraries have been added causing the compiler to re-proccess all that code again until it builds successfully and in the meantime autocomplete stops.

Yup, it can be infuriating.

1 Like

Thanks a lot.