Created
October 23, 2015 10:08
-
-
Save Jerrot/1bc08d23d55a6521af86 to your computer and use it in GitHub Desktop.
Resets all installed Xcode simulators and deletes the contents of Derived Data
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
#!/bin/sh | |
instruments -s devices \ | |
| grep "(\d[.0-9]\+) \[[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}\]" \ | |
| grep -o "[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}" \ | |
| while read -r line ; do | |
echo "Reseting Simulator with UDID: $line" | |
xcrun simctl erase $line | |
done | |
rm -rf ~/Library/Developer/Xcode/DerivedData/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment