Created
April 26, 2015 10:03
-
-
Save pietbrauer/dbdf8c0d99aa9a4e9ad1 to your computer and use it in GitHub Desktop.
Shutdown and reset all iOS Simulators
This file contains 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
erase_sim: | |
./reset_sim.sh 2>/dev/null; true |
This file contains 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
killall "iOS Simulator" | |
OUTPUT="$(xcrun simctl list)" | |
echo $OUTPUT | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' > output.txt | |
for UUID in `awk '{ print $1 }' output.txt` | |
do | |
xcrun simctl shutdown $UUID | |
xcrun simctl erase $UUID | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment