-
-
Save Gerst20051/0c0a827b82fe8666555dd3bec8a70f72 to your computer and use it in GitHub Desktop.
Resets all installed Xcode simulators and deletes the contents of Derived Data
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 | |
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