Xcode 6 isn't autocompleting in Swift

Avner Barr picture Avner Barr · Aug 5, 2014 · Viewed 33.1k times · Source

I am trying to import various libraries which I can't remember their exact name. Unfortunately Xcode 6 (using swift) isn't auto completing them like was done in Xcode 5 using objective-c.

For instance:

ALAssetsLibrary
MPMediaPlayer

etc.

I am forced to Google the exact framework name and then go back and copy paste.

In general autocomplete is working very poorly. Am I doing something wrong in Xcode 6?

Should I set any flags in settings to get it to work?

Answer

bWlrYWphdWhvbmVu picture bWlrYWphdWhvbmVu · Oct 27, 2014

This fix from apple dev forums works for me. I have had performance/autocomplete issues since beta 5 i think and now xcode 6.1/Yosemite on my old 2010 MBP is working flawlessly.

  1. Quit Xcode.
  2. Restart the computer (this is to clear any in-memory caches).  
  3. Delete the contents of the DerivedData folder (~/Library/Developer/Xcode/DerivedData)
  4. [This is the key move:] Delete ~/Library/Caches/com.apple.dt.Xcode.

Now launch Xcode once more…