Xcode 6.3 autocompletion slow with bridging header (e.g Parse) - xcode

tl:dr
Xcode Update 6.3.1 solved the problem for me.
It's still lightly slower than before but I'll give that shame to my Evo 840.
the problem
Since I've installed the latest Xcode version (6.3) my projects with bridging headers seem to have problems with autocompletion. It's incredibly slow!
Is there any known workaround (except removing bridging headers...)?
EDIT:
Bug reports
20549109
20549764
20549768
EDIT (04/17/2015):
bugreport.apple.com marked this as a duplicate of
20445407

I had similar issues and after updating to xcode 6.3.1 and swift 1.2 they dissapeared.
Not appearing with xcode 7 & swift 2.0

Steps are as:
1. Just go in user->Library->Developer->Xcode->DeriveData and delete the Data of folder(Derive data).
2. Just restart your system.
3. It will work better.

Related

Xcode 9 code completion and highlighting not working

I have seen many threads about this online, but not for Xcode 9. For some reason code completion and syntax highlighting is no longer working. Last week it was fine.
Using the GM build.
Anyone have this issue or know how to resolve it? A restart of Xcode and my computer did not help.
In Finder I navigated to user->Library->Developer->Xcode->DerivedData and deleted the subfolder of the project in question. After next build of the project the syntax highlighting and code completion returned.
In my situation, there are a few of .swift files not working. I've overcome by removing these files from project and re-adding them back.
Quitting Xcode then reopening it works for me.
To make it work again, I have to restart the macOS System.
I'm using Xcode 11.0 (11A420a), at the same time, Xcode 10 works OK.
So I think there is some process does not work, which should work for code coloring.
For me, code completion/highlighting not working due to the missing file in the Compile Sources under Build Phases. I added that file and it works.
Hope this helps anyone.
I have observed the same problem while writing in swift on xcode 9.0, Seems it is fixed in 9.1 i am using 9.1 which is fine, please update xcode to 9.1 or newer.

Error in conversion to swift 3 syntax for an existing cocoapods integrated project

I've recently upgraded to xcode 8 and did a conversion for my xcode project. While every other swift files checks out fine, there seems to be issues with this particular swift file.
I suspect it could be a result of cocoapods not being updated and thus I did a repo update to the latest pre version before doing a pod install on the project again but still to no avail.
Hmmm ok I found a way to fix this, apparently just going to product>clean will solve most of the problems. This is for anyone out there converting to swift 3. Now on to solve some other problems...

Xcode switching between Swift 2.2 and Swift 3.0

Ever since I downloaded the new Xcode and converted/updated my syntax, Xcode has been randomly switching between the above mentioned versions of Swift. I ran 'swift -version' in my Terminal and it confirmed (for the moment) that I am running Swift 2.2
I saw this question (Swift compiler is confusing version 2 and 3) but I'm too new to add a comment and ask more questions (like why can't I find that in the targets section of my project?).
How can I set my syntax so that it stays on Swift 3 and doesn't change without warning? This will be about the fourth time I've updated everything for the sake of testing/running my app.
Hopefully this is an issue for other people and this question helps them too - I feel awful asking when I'm new. I hope to be able to know enough to help other users soon.
You can set Swift in the Terminal to be the same version as Xcode 8's with xcode-select. Point it at Xcode beta like this:
sudo xcode-select --switch /Applications/Xcode-beta.app
You can also set the toolchain right in Xcode 8, in menu Xcode > Toolchains > Manage Toolchains:

Xcode 6.4 crashes in Swift breakpoint

In one project I'm using I can't set breakpoints in Swift code, Xcode always crashes when reaching one of them, doesn't matter if it's a "manual" or an exception breakpoint.
In other projects everything works as expected, only for one project Xcode 6.4 (6E35b) always crashes.
I tried cleaning, deleting derived data, resetting simulator, restarting Xcode/Mac - nothing helped at all.
Anyone else experiencing this problem and hopefully knows what helps?
EDIT
Seems only to be the case on one machine (Xcode 6.4, 10.10.5), but not on the other (Xcode 6.4, El Capitan). But as I mentioned in the comments, reinstalling Xcode didn't help, are there some other preferences I could reset/delete?
EDIT2
Here's the Xcode crash log file:
https://dl.dropboxusercontent.com/u/119600/Xcode_2015-08-12-074655_Stefans-iMac.crash
I would try uninstalling and reinstalling Xcode to see if it helps... I've heard of successes with this technique for similar issues.
Just delete the entire Xcode.app from /Applications, and reinstall from the .dmg. If you're not certain of the binaries and have time / bandwidth, consider re-downloading the .dmg.
If that doesn't work, try the following source control tricks (substitute "your favorite revision control" for "git"):
Try purging all objects not in source code control
Another approach: Check out the app again into a fresh repository (this will get even the files that may have been committed but ignored later).
If not under source code control, grab a .gitignore from here and add it to git, then check out into another directory (this will leave everything but source, interface builder, project files and resources/assets behind).
I'd suggest moving the breakpoint code to another location (such as making a function call and breaking either before or inside the function). However, if all Swift code has this problem, that may not work.
Finally, after making an interim commit (to roll back to), try it in Xcode 7 beta. Bit of a hassle because you have to upgrade to Swift 2.0, but if you keep the deployment target the same no iOS target changes are needed.
If this really is a burden and/or it's a small project, you could try creating a new project and migrating the files and storyboard over, but likely this is too much effort.
Either way, since you note it's pretty much all breakpoints in Swift code, file a bug with Apple's bug reporter. They really need to hear about issues such as this, since you don't seem to be alone in having this issue.
EDIT: Where are others seeing this issue?
Maybe we can see commonality -- since this is only reported in Swift projects (so far). A colleague has seen this problem with breakpoints (as well as stepping through code) in Xcode 6.4 on 10.10.4. (I've seen Xcode 6.4 crashes in the past as well).
I see OS version 10.10.5 mentioned as a target where this happens (#swalkner); is this a beta? If OS 10.10.4/5 is the only place we see this, it might be significant. If it's a project/OS interaction, it might be tricky to reproduce / fix, but I'd encourage everyone to submit detailed bug reports to Apple (maybe even link this post).
Some points to note if you're seeing this:
Operating System Version
Hardware
Target: Simulator vs. Hardware; iOS vs WatchKit app.
Target SDK version(s)
Swift only? Or on an Objective-C only project? Mixed?
Only one project, or several?
It's a longshot, but let me know if it's working:
uncheck the "Always show Dissasembly" check
Debug > Debug Workflow > Always Show Disassembly
In older versions of Xcode (<6.1):
Product > Debug Workflow > Show Disassembly When Debugging
I've just spent the past few hours trying to solve exactly the same issue.
I thought at first, it had started due to installing Xcode 7 on the same machine as Xcode 6.4. The problem certainly coincided.
However, due to having version control, I could look and see what files had changed since opening the project with Xcode 7.
The images.xcassets file had changed. Reverting this file back has stopped Xcode from crashing each time it hit a breakpoint.
I'm not sure whether this helps at all, but definitely look at images.xcassets and if needs be, delete it, recreate it and ensure it's setup 100%. It certainly fixed my issue.

Error Xcode 6 --> Error SourceKit terminated. Editor functionality temporarily limited [duplicate]

This question already has answers here:
SourceKitService Terminated
(34 answers)
Closed 8 years ago.
Sometimes I get this error in Xcode 6 and the canvas turns white.
Am I the only one this happens to, or is it a bug?
I still have this issue.
I have a working solution:
If you are targeting on iOS8, switch the deployment target to iOS7,
If this issue happen again, switch the deployment target to iOS8,
If this issue happen again, switch the deployment target to iOS7,
If this issue happen again, switch the deployment target to iOS8,
...
...
...
Hope this help you.
Update:
Seems this is better solution:
Quite Xcode, and delete all the folders in the DerivedData directory
I use Xcode 6 beta5, when I declare member as lazy, it will show this error when I enter new line. It works when I remove the keyword lazy.
class PointZoomingView : ZYZoomingView, CMPopTipViewDelegate
{
private ***lazy*** var pointButtonList: [PointButton] = []
var hwRate: Double! = 1
[UPDATE]
If your [PROJECT_NAME]-Bridging-Header.h import a non existing header file, the SourceKitService will be Terminated frequently
SourceKit appears to simply be very, very bad.
The list of problems above contains a number of possible causes; beta software, code being updated across releases (created in one version, edited in another), problems with IB connections, bridging or issues with override and/or lazy.
Well I'm using the release version of Xcode 6.1. The code was created in this version. There isn't a single use of overrides, lazy or bridging. It does file handling, and doesn't have a single IB connection (yet). The code is entirely devoted to opening text files and parsing them, using the most basic Cocoa primitives, mostly NSString.
SourceKit crashes every couple of minutes. It crashes so often and randomly I cannot determine any sort of pattern. One issue appears to be if an existing line of code contains a reference to one type and then changes to another, but that's definitely not sure-fire nor the only cause. (Update: crashes with every 10th or so keystroke now)
I was having a problem with xcode 6 beta 6. I finally changed the iOS Deployment Target from 7.0 to 7.1 and my problem went away!
You should report a bug to apple as Xcode is in beta mode so don't expect it to work fine. Although there are many points at which this occurs in my case it was occurring randomly or by writing piece of code in between [].
Download the latest version of Xcode 6 beta and enjoy coding...
an update released in Dec 2, 2014, related to this error.
Please make sure your xcode latest.
Xcode, Apple Version 6.1.1 Released Dec 2, 2014
Includes SDKs for OS X 10.10 Yosemite, OS X 10.9 Mavericks, and iOS 8.1
- Fixed common causes of SourceKit crashes when working with Swift
- Additional bug fixed and stability improvements
Try rewriting the methods you have defined/overrided.
I faced this problem when I updated my Xcode6 from beta 3 to beta 4. Xcode6 beta 4 differs in the IBOutlet declaration and treats IBOutlet declarations of Xcode6 beta 3 as errors. When I changed the declarations(of Xcode beta3) with beta 4 this SourceKit Service error popped up.
What I did to fix my code :-
Removed all the methods of tableview delegate and datasource and write them again. Now everything works just fine.
I can confirm that this command on terminal solves it
rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache
.. delete all the Content of the DerivedData folder .. apparently there are project based files and moduleCache may be a general one, and by deleting only the moduleCache the problem can still remain in the project based files

Resources