Created
February 7, 2017 17:12
-
-
Save elmodos/3ca4292c3e36023bd4c6fd6050f06ff0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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