Xcode Source Kit will not stop crashing with Swift

2019-03-09 03:49发布

问题:

This question already has an answer here:

  • SourceKitService Terminated 34 answers

I need to find a solution to the super awesome "Source Kit Crashing" error with Swift. I have read many stack overflow posts but it doesn't seem like anyone has a solution. If there is a single line of code causing the problem there is no way I will find it by fishing through 50 + source files. Does anyone have a solution to this problem?

Xcode is essentially as useful as notepad it has gotten so bad. Please someone have a solution :). Source Kit crashes every single time I type a letter in any file.

Included Frameworks: Parse, Layer, Fabric, Various apple frameworks

Note: My app compiles and run completely fine

回答1:

You've probably tried all this, but just in case:

  1. close Xcode
  2. remove '~/Library/Developer/Xcode/DerivedData/'
  3. remove '~/Library/Caches/com.apple.dt.Xcode'
  4. restart your computer (just in case).

This should bring you code completion back, but the problem will eventually return. Xcode 6.1.1 beta (or now 6.2 beta with WatchKit) should fix many of the SourceKit related problems.



回答2:

Dec 2, 2014, Apple deployed an update Xcode 6.1.1 that addressed the common source kit issue! For anybody who is coming across this issue.