问题
This just started today. Autocomplete
had been working fairly well and then started sputtering, only showing autocomplete
for some standard Cocoa
classes / methods etc. Best described as periodic strange omissions. I am using Cocoa
& Objective C
but it seems to be broken for more than just Objective C
.
I deleted the derived data and it had no effect. (default is ~/Library/Developer/Xcode/DerivedData
but I like to keep in my project folders for easy delete)
Xcode
is so huge (like an operating system) I hesitate to re-install and reading the postings here, that does not work anyway.
It is testing my memory of Cocoa
methods and parameter order... life before autocomplete
was OK but I would like to have it back...
回答1:
Caches are the Achilles heel of macOS so... on a lark, dug around and found the ~/Library/Caches/com.apple.dt.Xcode file. It was 1.33G (jez).
I quit Xcode, deleted the cache "file", then relaunched Xcode. Voilà!, здесь!, (or down south "Hot DANG!") we are back in business. Code coloring is back, autocompletion is back, auto compile (auto complain :-) is now working.
来源:https://stackoverflow.com/questions/41507673/xcode-8-autocomplete-broken-displays-only-limited-user-code-snippets-know-wh