Copy paste text into iOS simulator

I found that even with Edit > Automatically sync pasteboard ticked, the feature didn't work.

However, simply unticking and then reticking this option fixed the feature!

Hope it works for someone.


Be careful to avoid conflating the mac's clipboard with the simulator's clipboard. They are not the same.

The simulator is simulating an iOS device, with it's own iOS clipboard which apps running on that device (simulator) use via the iOS pup-up select-all/copy/paste UI items.

Completely separate from that: your mac has it's own clipboard and content. The Simulator program running on your mac provides the Edit > Paste Text menu item. The program implements that menu item by accessing your mac clipboard and types the text into the simulator as if the user used the keyboard. The iOS clipboard is neither accessed nor affected by the Simulator application's Edit menu functions.

Update: As of Xcode 6, you need to choose the Edit > Paste menu item in the iOS Simulator (this transfers the data between the Mac clipboard and the iOS Clipboard), then tap in the field in the simulator and tap the "Paste" bubble.

In your question you don't specify which "Safari" you're copying the URL from. It could be the mac safari application or the simulator's safari app. Doing a copy from the mac safari program goes to the mac clipboard, doing a copy from the safari app goes to the iOS clipboard inside the simulator.

I think your issues are coming from confusing the two, thinking there's one clipboard everything is sharing.


Copy text on the mac, then click the text field in the simulator and press

Shift Command V

Tags:

Ios

Clipboard