52

I've just updated to Xcode 9.4.1 and experienced an issue with the clipboard being cleared randomly.

So I select a text, hitCMD+C, then go to the position I want to paste it, hitCMD+V, but either

  • it plays the system alert sound and doesn't paste anything, or
  • it pastes a previous snippet that I copied earlier.

Update

Still remains with Xcode 10.1

Update 2

Still remains with Xcode 11

askedJun 14, 2018 at 12:03
Lukas Würzburger's user avatar
13
  • I've experienced this issue numerous times with older Xcode versions as well. Not sure if it has to do anything with my clipboard manager (I'm using Copied, I used iClipboard before and the same issue occurred to me back then).CommentedJun 14, 2018 at 12:30
  • I use Alfred, but never had an issue with that before ...CommentedJun 14, 2018 at 12:39
  • @matt I know that it's a valid workaround, but I'd rather use punch cards than copying and pasting with my mouse (touchpad). I usually just copy the selected part again and it works.CommentedJun 14, 2018 at 12:50
  • 1
    @matt Because it happend right after the update of Xcode. So still programming related. Because IDECommentedJun 14, 2018 at 12:53
  • 1
    I noticed the same problem with the Xcode 10 update. At first I thought it was me that didn't properly copied the text (even though it almost never happened before) but I just cut/paste some text and when I was about to paste it, nothing... I checked and it was properly copied to my clipboard manager. I'm pretty positive it's an Xcode problem.CommentedSep 26, 2018 at 4:45

5 Answers5

64

Turning off the 'Automatically Sync Pasteboard' option in the Edit menu of the Simulator works for me. I read it in Apple forums

answeredOct 9, 2018 at 12:15
Eva Madrazo's user avatar
Sign up to request clarification or add additional context in comments.

5 Comments

Thank yo so very much!! This was driving me bat * crazy!
Still happens in Xcode 10.2.1, and this workaround seems to fix it.
In my case this didn't help. I tried several times. Enabling and disabling the sync. As soon as I hit Get Pasteboard from Edit menu, the simulator is frozen and I need to Force Close it. Xcode 10.2.1. iPhone XsMax and others. For me the solution is: Disable Auto Sync + IMPORTANT((SHOW KEYBOARD)). The simulator keyboard should be visible. Then it works as a workaround.
@VitoValov I disabled auto sync and show keyboard (no hardware connected) and it still hangs.
In case instead i'm NOT using simulator - in the Edit menu doesn't exist that options :( So i'm witing each time 1-3 minutes before to having pasted my code in the editor
8

This really helps! Just uncheck the Automatically Sync Pasteboard

enter image description here

answeredFeb 28, 2019 at 11:01
IvanPavliuk's user avatar

Comments

2

Also read in the Apple forums that closing the simulator while working fixes this issue. So if it happens to me I close the simulator and copy-paste works fine from that point forwards.

Haven't tried it yet but I have feeling that Eva's answer is correct in that the simulator is trying to sync your pasteboard.

Apple forum article

** Edit **

Can confirm that Eva's answer works and I no longer have this issue when I turn of automatic syncing on the simulator

answeredOct 22, 2018 at 11:10
Nick Kirsten's user avatar

Comments

2

The accepted answer doesn't work for me. See my comment there.The problem is with the Handoff.

I had theHandoff option enabled in OS X Settings > General.

Afterunchecking that option, I have the clipboard synced and no simulator freezes.

enter image description here

answeredJun 28, 2019 at 16:35
Vik Marino's user avatar

Comments

0

You Can try this one:

This is the officially recommended way to reset Xcode's preferences, type in Terminal.app:

defaults delete com.apple.dt.Xcode
answeredSep 7, 2020 at 10:49
Gopal Devra's user avatar

Comments

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.