Skip to content

Instantly share code, notes, and snippets.

@yamaya
Last active October 5, 2015 18:29
Show Gist options
  • Save yamaya/2853897 to your computer and use it in GitHub Desktop.
Save yamaya/2853897 to your computer and use it in GitHub Desktop.
Run iPhone Simulator with target .app from the command line
#!/bin/bash
# NOTE: $1 must be absolute path.
open -a `xcode-select -print-path`/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app --args -SimulateApplication $1
osascript 2>/dev/null <<EOF
tell application "System Events"
tell process "iPhone Simulator" to keystroke "2" using command down
end
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment