Last active
January 6, 2020 20:11
[Shell] Deep clean Xcode project
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 | |
# Deep clean Xcode project. Run from project root directory. | |
if [ -d "build" ]; then | |
/bin/rm -rf "build" | |
fi | |
if [ -d "$HOME/Library/Developer/Xcode/DerivedData" ]; then | |
/bin/rm -rf "$HOME/Library/Developer/Xcode/DerivedData/*" | |
fi | |
if [ -x "$(command -v xcodebuild)" ]; then | |
/usr/bin/xcodebuild -configuration "Debug" clean | |
/usr/bin/xcodebuild -configuration "Release" clean | |
fi | |
/usr/local/bin/pod deintegrate | |
if [ -f "Podfile.lock" ]; then | |
/bin/rm -f Podfile.lock | |
fi | |
if [ -x "$(command -v pod)" ]; then | |
/usr/local/bin/pod cache clean --all | |
/usr/local/bin/pod repo update | |
/usr/local/bin/pod install | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment