xplode 510 Bytes
Newer Older
Matthew Lorentz's avatar
Matthew Lorentz committed
1 2 3
#!/bin/bash

# Find the open version of Xcode
4
XCODE="$(ps -e | egrep -m1 -o  '/.*/Xcode[- 0-9.]*\.app')"
Matthew Lorentz's avatar
Matthew Lorentz committed
5 6

# Quit Xcode
7
echo "xplode: Quitting Xcode..."
Matthew Lorentz's avatar
Matthew Lorentz committed
8 9
killall Xcode

10
# Delete Derived Data (has same effect as Clean and Clean Build Folder)
Matthew Lorentz's avatar
Matthew Lorentz committed
11
echo "xplode: Deleting DerivedData folder..."
12
rm -rf "$HOME/Library/Developer/Xcode/DerivedData/"
Matthew Lorentz's avatar
Matthew Lorentz committed
13 14

# Reset Simulators
15
echo "xplode: Resetting all Simulators..."
Matthew Lorentz's avatar
Matthew Lorentz committed
16 17 18 19 20 21
xcrun simctl shutdown all
xcrun simctl erase all

# Restart Xcode
echo "xplode: Opening Xcode..."
open $XCODE