Xcode Clipboard: Copy & Paste stuck

IosXcodeXcode10Xcode11xcode9.4

Ios Problem Overview


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

So I select a text, hit CMD+C, then go to the position I want to paste it, hit CMD+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

Ios Solutions


Solution 1 - Ios

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

Solution 2 - Ios

This really helps! Just uncheck the Automatically Sync Pasteboard

enter image description here

Solution 3 - Ios

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

Solution 4 - Ios

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

I had the Handoff option enabled in OS X Settings > General.

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

enter image description here

Solution 5 - Ios

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLukas WürzburgerView Question on Stackoverflow
Solution 1 - IosEva MadrazoView Answer on Stackoverflow
Solution 2 - IosIvanPavliukView Answer on Stackoverflow
Solution 3 - IosNick KirstenView Answer on Stackoverflow
Solution 4 - IosVito ValovView Answer on Stackoverflow
Solution 5 - IosGopal DevraView Answer on Stackoverflow