There are some times that we have to delete the derived data that Xcode produces.
There are many ways to achieve this. In this article we will add a bash command to do it, so every time you want to delete the derived data all you have to do is to go to the terminal and type the command.
Let’s start by open the bash_profile file.
Open terminal and type
1 |
nano ~/.bash_profile |
The file is currently empty let’s add an alias
alias DeleteDerivedData='rm -rf ~/Library/Developer/Xcode/DerivedData'
Now open terminal and type
source ~/.bash_profile
Now type DeleteDerivedData, and notice the derived data has been deleted!