Skip to content

Instantly share code, notes, and snippets.

@edenwaith
Created January 2, 2024 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edenwaith/66181c1343f714cf87ee14026c42dc78 to your computer and use it in GitHub Desktop.
Save edenwaith/66181c1343f714cf87ee14026c42dc78 to your computer and use it in GitHub Desktop.
Applescript to copy text from the Mac's clipboard to older iOS Simulators
-- Any iOS Simulator which isn't the most current version has issues with working with the
-- system's clipboard, which makes things difficult if one wants to copy a lengthy username
-- into a field. This script is a workaround which will get the text from the system's
-- clipboard and then paste that text into a field in the active iOS Simulator.
-- Reference: https://stackoverflow.com/questions/15188852/copy-paste-text-into-ios-simulator
tell application "System Events"
set theText to get the clipboard as text
delay 1
repeat with aCharacter in characters of theText
keystroke aCharacter
delay 0.05
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment