[英]Xcode 8.3 autocomplete and syntax highlighting not working
I'm very new to Xcode and Objective C, though I've been developing with Unity/C# for some time now. 我是Xcode和Objective C的新手,虽然我已经用Unity / C#开发了一段时间了。 I'm having a hard time trying to get the autocompletion and syntax highlighting to work "properly" in Xcode 8.3.
我正在努力让自动完成和语法突出显示在Xcode 8.3中“正常”工作。 Over that last two days, I've been searching all over the internet and tried all the recommended solutions and workarounds that I found without any luck.
在过去的两天里,我一直在互联网上搜索并尝试了我发现的所有推荐的解决方案和解决方法,没有任何运气。 So I decided to open a new question.
所以我决定开一个新问题。 Steps to reproduce my issue:
重现我的问题的步骤:
What I tried: 我尝试了什么:
I'm probably missing something basic here, but I think it's reasonable to expect such feature to work out-of-the-box, without much hassle? 我可能在这里遗漏了一些基本内容,但我认为期待这样的功能开箱即用,没有太多麻烦是合理的吗?
Any help would be much appreciated! 任何帮助将非常感激!
UPDATE: 更新:
I also tried: 我也尝试过:
Also the test app is a very simple one with few lines of code and it builds fine. 此外,测试应用程序是一个非常简单的代码,几行代码并且构建良好。 The only warning is the "unused variable" for the UIViewController *vc variable (2nd screenshot).
唯一的警告是UIViewController * vc变量的“未使用的变量”(第2个截图)。
Turned out the issue was caused by my own action (mistake). 原来这个问题是由我自己的行为造成的(错误)。
Long ago, when I had my first brief interaction with Xcode, I deliberately tried to disable its indexing , because it took too long on my Mac (which was not upgraded by that time). 很久以前,当我第一次与Xcode进行简短的交互时,我故意试图禁用它的索引 ,因为我的Mac上花了太长时间(当时没有升级)。 So I did that by typing this in the Terminal:
所以我在终端输入了这个:
defaults write com.apple.dt.XCode IDEIndexDisable 1
And there it was. 它就在那里。 I totally forgot about this until I had to touch Xcode again recently, and was driven mad by the autocomplete and syntax highlighting "not working".
我完全忘了这个,直到最近我不得不再次触摸Xcode,并被自动完成和语法突出显示“不工作”而疯狂。 There's no Xcode fault whatsoever.
没有任何Xcode错误。 All I needed to do to make it work is enable indexing again, by typing this in the Terminal:
我需要做的就是让它工作再次启用索引,方法是在终端输入:
defaults delete com.apple.dt.Xcode IDEIndexDisable
I obviously created my own trouble, but hopefully this information will be helpful to someone else. 我显然创造了自己的麻烦,但希望这些信息对其他人有帮助。
Thank everyone for your help. 感谢大家的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.