Xcode 9 code completion and highlighting not working

心不动则不痛 提交于 2019-12-09 07:46:15

问题


I have seen many threads about this online, but not for Xcode 9. For some reason code completion and syntax highlighting is no longer working. Last week it was fine.

Using the GM build.

Anyone have this issue or know how to resolve it? A restart of Xcode and my computer did not help.


回答1:


In Finder I navigated to user->Library->Developer->Xcode->DerivedData and deleted the subfolder of the project in question. After next build of the project the syntax highlighting and code completion returned.




回答2:


Quitting Xcode then reopening it works for me.




回答3:


In my situation, there are a few of .swift files not working. I've overcome by removing these files from project and re-adding them back.




回答4:


To make it work again, I have to restart the macOS System. I'm using Xcode 11.0 (11A420a), at the same time, Xcode 10 works OK. So I think there is some process does not work, which should work for code coloring.




回答5:


I have observed the same problem while writing in swift on xcode 9.0, Seems it is fixed in 9.1 i am using 9.1 which is fine, please update xcode to 9.1 or newer.



来源:https://stackoverflow.com/questions/46414467/xcode-9-code-completion-and-highlighting-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!