Skip to content

Instantly share code, notes, and snippets.

@w-i-n-s
Forked from pietbrauer/Makefile
Created October 13, 2016 21:56
Show Gist options
  • Save w-i-n-s/feec1b3f96791c81c09aba340ee3ebf7 to your computer and use it in GitHub Desktop.
Save w-i-n-s/feec1b3f96791c81c09aba340ee3ebf7 to your computer and use it in GitHub Desktop.
Shutdown and reset all iOS Simulators
erase_sim:
./reset_sim.sh 2>/dev/null; true
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