12

I am using Xcode 6.1 with a Swift project.

I get the "SourceKit" (iirc) editor crashing issue several times a day but it usually resolves itself and doesn't result in having to close Xcode.

Now the last time it happened it resolved itself but has now taken away all autocompletion calls. Nothing autocompletes, my class functions, UI*, nothing (aside from basic types UInt etc).

I have cleared derived data, removed Xcode and it's related files, re-installed and nothing completes automatically, nor by using the escape key to show suggestions. Autocomplete is definitely checked in preferences as I have been using it for almost a month prior to todays issue.

Has anyone else experienced this? and does anyone have a solution to this problem? Really, really need autocomplete back.

Thanks

PersuitOfPerfection
  • 1,009
  • 1
  • 15
  • 28
  • I experience this constantly and I've tried deleting all sorts of config/cache files and resinstalling to no avail – Aggressor Mar 27 '15 at 19:01
  • @Aggressor Xcode 6.2 also has this problem... just not as frequent in my experience. Xcode 6.3 (beta) seems a lot better in this regard, from the short time I used it.. but naturally isn't a solution until we can migrate our apps to Swift 1.2 and until it goes into GM at the earliest – PersuitOfPerfection Apr 02 '15 at 15:31
  • I did find an obsure solution that does work. If you build to a simulator (like iPad2 or any other simulator than you were using) it can fix the problem. – Aggressor Apr 02 '15 at 15:51

3 Answers3

8

Yes this is a bug that I have been experiencing for the last few days in 6.1 The solution for us was to stop building on the simulator. Once we did that (and started testing on actual devices) the sourceViewKit started working again. I'm not exactly sure why this is the case, but it seemed to work for us when nothing else did.

Glynbeard
  • 1,389
  • 2
  • 19
  • 31
  • Thank you SO MUCH! This fixed the issue for me. Would have never thought to correlate the two of those. You have helped tremendously. Cheers! PS: Has anyone reported this bug to apple yet? – PersuitOfPerfection Nov 06 '14 at 15:58
  • No problem man. I spent a good half a day trying to figure this out. I did everything you said and it was still breaking (made me want to tear my hair out). I figured this out accidentally but was glad I did. – Glynbeard Nov 06 '14 at 16:00
  • Tell me about it :> I hope someone has reported this to Apple. Might go ahead and report it myself (regardless) to get it some traction. – PersuitOfPerfection Nov 06 '14 at 16:35
  • Has anyone resolved this for the case where you are building a desktop app? – Nikolay Tsenkov Nov 10 '14 at 14:13
  • I actually found something that resolved it for a Cocoa project: http://stackoverflow.com/a/25839664/880114 – Nikolay Tsenkov Nov 10 '14 at 14:55
  • So odd but this has restored autocomplete (for now). – Aggressor Feb 03 '17 at 13:44
3

It is definitely a bug. In fact changing to a different simulator (i.e. iPhone 5 to iPhone 5s) and running once does also solve the issue. You do not have to run on actual device (for those who do not have a paid developer license)

turkenh
  • 2,564
  • 3
  • 25
  • 32
  • 1
    This also works, provided you did not use the simulator type in question ( say iPhone 5s for instance ) before the issue happened. This also begs the question... is there a way to clear the data associated with the various simulators? Perhaps that would fix it until apple do.... – PersuitOfPerfection Nov 07 '14 at 14:55
0

Xcode 6.3 public release version (released publicly at time of writing) seems to have fixed these issues (at long last).

PersuitOfPerfection
  • 1,009
  • 1
  • 15
  • 28
  • 5
    If that was the case, Xcode 6.4 re-intriduced the issue. – Nils Hott Jul 13 '15 at 12:22
  • This seems to be back in Xcode Version 8.2.1 (8C1002). Changing the build target does not solve the issue now though. Autocompete or using the escape key only provides the first couple user defined code snippets from the code snippet library. Have seen Xcode code snippet library issues, suspect related... – Cerniuk Jan 06 '17 at 13:55