6

I am using Xcode Version 6.1 (6A1052d), it is working well except the only problem is auto complete and code sense is broken for swift projects.

I can fix it by deleting derived data and the folder ~/Library/Caches/com.apple.dt.Xcode, which is described here, or changing the deployment target of the project from 8.1 to 8.0.

However, the first solution only last me for 1 or 2 days, out of no where it doesn't work again, I don't want to delete the folders every so often or change the target iOS versions all the time. Please help me.

Community
  • 1
  • 1
gabbler
  • 13,626
  • 4
  • 32
  • 44
  • 1
    Unfortunately there is no other way. File a bug report and wait for the next release – Anil Varghese Nov 10 '14 at 09:52
  • This sometimes helps also http://stackoverflow.com/questions/26672777/xcode-6-1-swift-extensions-sourcekit-service-crash?noredirect=1#comment41947150_26672777 – sbarow Nov 10 '14 at 09:55
  • @sbarow, the link you gave is about adding Extensions and SourceKit service. – gabbler Nov 10 '14 at 10:01
  • 1
    @gabbler the autocomplete and code sense break is because of SourceKit crashing no? There seems to be a whole bunch of things that can break autocomplete, extensions, large files, Derived data etc. – sbarow Nov 10 '14 at 10:22
  • Where can I find the SourceKit crashing report? I only see "symbol not found" when I command+click the code, maybe it has something with SourceKit crash. – gabbler Nov 10 '14 at 10:32

2 Answers2

5

I have had the same issue for many days while working in swift, finally I have deleted some old data in the directory ~/Library/Developer/Xcode/DerivedData and started the xcode again and error is disappeared.

Hope it helps!

nsgulliver
  • 12,655
  • 23
  • 43
  • 64
  • Thanks for the response, after you delete the directory, does the problem go away permanently, I tried and problem recurred. – gabbler Nov 10 '14 at 12:11
  • for me the problem disappeared, if problem persist then you could delete everything in xcode directory & try to uninstall & install xcode. This might be the last resort but will solve the problem. – nsgulliver Nov 10 '14 at 12:19
  • I upgraded Xcode through App Store from a beta version, I'll try reinstalling and hope that this problem could be solved. – gabbler Nov 10 '14 at 12:21
  • 1
    I tried on two different machines, on one of the machine it disappeared just by deleting DeriveData but on other machine i had to reinstall and it works on both machines now, what a relief. – nsgulliver Nov 10 '14 at 12:26
  • 1
    After reinstalling xcode, the problem seems to have gone for now. – gabbler Nov 14 '14 at 02:46
0

it's not gone .. I do this procedure 3-4 times a day while coding .. did anyone find a permanent fix? I'm on Xcode 6.3 beta on Yosemite.. on 6.1 I had to do this process more than 5-6 times per day, but they did not fix it entirely :(. I observed that working in one file and not switching back and forth really delays this from happening + if you work with collection views or table views and switch and modify in all files of your MVC architecture, there are greater chances you will need to restart Xcode (which in 6.3 beta fixes this issue automatically). If only there was a way to force a re-indexing on the project ..

Stefan
  • 762
  • 1
  • 8
  • 11
  • well I installed 6.3 beta .. I still have 6.1, installed. There is no use in uninstalling. All methods turn out to be temporary ones.. – Stefan Mar 08 '15 at 12:53
  • I only have 6.1 installed, it is working fine for me, although sometimes it crashes, I just have to close the project and reopening it. – gabbler Mar 08 '15 at 12:55