Xcode makes a mess sometimes, this simple utility will help clean it up.
This is a simple command line utility that was written to be a cron job on a Jenkins build machine.
It completely "cleans" (a.k.a. deletes) the following locations on your Mac so be careful!
~/Library/Developer/Xcode/Archives
~/Library/Developer/Xcode/DerivedData
- Open the Xcode project.
- Choose your code signing option (if required)
- Select Product > Archive from the Finder menu bar.
- Once Archiving finishes the Organizer should open, if it does not, open it by selecting Window > Organizer
- Select
xcode-cleanup
from under the "Other Items" section on the left side of the Organizer - Choose Export
- Select Built Products and choose where you want to save the executable.
- Copy the
xcode-cleanup
file to/usr/local/bin
so it can easily be used from the Terminal
- Unzip the utility.
- Copy the
xcode-cleanup
executable to/usr/local/bin
- Open a Terminal
- Type
xcode-cleanup
and hit return - That's it!
This is an extremely simple utility so it doesn't have a large roadmap, execpt possibly bundling it with other tools with a UI.
If you have ideas, suggestions, feel free to open a Pull Request.
This utility is released under the MIT License.