6

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...

vaibhav
  • 4,038
  • 1
  • 21
  • 51
Cerniuk
  • 14,220
  • 2
  • 29
  • 27
  • Just noticed that the code coloring is also broken. Everything compiles, runs and debugs no differently but autocomplete and the code coloring for methods is not working. – Cerniuk Jan 06 '17 at 14:20
  • 1
    Having this issue as well, clearing the derived data directory helpt for me. – rckoenes Jan 06 '17 at 14:27
  • Another symptom, the automated compiling and complaining in Xcode seems to have initially slowed and now has stalled completely. Changing a line of code to correct something does not end up removing the warning or the error note on that line until I run a build. – Cerniuk Jan 06 '17 at 14:28
  • 1
    @rckoenes maybe mumbled it in my original question but deleting derived data for the project didn't do a thing this time. It is my "goto fix" for most Xcode tomfoolery but not this time. – Cerniuk Jan 06 '17 at 14:29

1 Answers1

7

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.

Cerniuk
  • 14,220
  • 2
  • 29
  • 27
  • 1
    This may help what I was running into, but not just the cache file itself, but the in-memory cache with multiple projects open, some using C++ (which, along with Swift quickly tax the autocompletion/code indexing) – uchuugaka Jan 07 '17 at 10:35