Skip to content

Instantly share code, notes, and snippets.

@Shilo
Last active August 29, 2015 13:59
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 Shilo/10633955 to your computer and use it in GitHub Desktop.
Save Shilo/10633955 to your computer and use it in GitHub Desktop.
AppleScript to hide iOS Simulator when you run Xcode Tests.
  1. Save Tests.scpt to the folder ~/.Xcode/
  2. Open the folder ~/.Xcode/ in Terminal.app
  3. Perform the command chmod +x ./Tests.scpt in Terminal.app
  4. Open Xcode ➭ Behaviors ➭ Testing Succeeds
  5. Choose ~/.Xcode/Tests.scpt in the Run popup
  6. Open Xcode ➭ Behaviors ➭ Testing Fails and repeat
#!/usr/bin/osascript
tell application "System Events" to tell process "iOS Simulator" to keystroke "h" using command down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment