Skip to content

Instantly share code, notes, and snippets.

@elmodos
Created February 7, 2017 17:12
Show Gist options
  • Save elmodos/3ca4292c3e36023bd4c6fd6050f06ff0 to your computer and use it in GitHub Desktop.
Save elmodos/3ca4292c3e36023bd4c6fd6050f06ff0 to your computer and use it in GitHub Desktop.
#!/bin/sh
PS3='Type the number of your choice (1, 2 or 3) and press Enter: '
options=("List Devices" "Run Simulator" "Quit")
select opt in "${options[@]}"
do
case $opt in
"List Devices")
xcrun simctl list devices
echo "\033[1m\n\nCopy the UDID in parentheses of the device which you want run and launch option 2 (Run Simulator)\033[0m"
;;
"Run Simulator")
read -p 'Type device UDID which you want launch: ' currentDeviceUDID
open -n /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/ --args -CurrentDeviceUDID $currentDeviceUDID
;;
"Quit")
break
;;
*) echo invalid option;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment