Xcode 6 with Swift super slow typing and autocompletion

后端 未结 11 1315
广开言路
广开言路 2020-11-30 19:05

Is it just me or Xcode 6 (6.0.1) with Swift seems to be super slow when you type your code, especially with autocompletion?

A normal Objective-C cla

11条回答
  •  时光说笑
    2020-11-30 19:32

    • Quit Xcode and restart the Mac are not required but preferred.
    • Delete the content of the folder ~/Library/Developer/Xcode/DerivedData
    • Delete the content ~/Library/Caches/com.apple.dt.Xcode

    This is a temporally solution, but works greatly.

    Below the script using Script Editor app.

    tell application "Terminal"
        do script "rm -frd ~/Library/Developer/Xcode/DerivedData/*"
        do script "rm -frd ~/Library/Caches/com.apple.dt.Xcode/*"
    end tell
    

    Alternatively, you can create an alias for your terminal like this:

    alias xcodeclean="rm -frd ~/Library/Developer/Xcode/DerivedData/* && rm -frd ~/Library/Caches/com.apple.dt.Xcode/*"
    

    You can add that to your ~/.bash_profile and then type xcodeclean on the command line every time you would like to clear those two folders.

提交回复
热议问题