I'm very new to Xcode and Objective C, though I've been developing with Unity/C# for some time now. I'm having a hard time trying to get the autocompletion and syntax highlighting to work "properly" in 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).
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). 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". There's no Xcode fault whatsoever. 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.