How to “Delete derived data” in Xcode8?

2019-01-15 05:52发布

问题:

In Xcode7 you click Window -> Projects and select the projects that you want the derived data to be deleted.

But with Xcode8 beta 2 the project menu no longer exists under the Windows menu. Are there any quick methods to delete the derived data through Xcode8 interface?

回答1:

  • Close Xcode
  • Open Terminal and enter this command

    rm -rf ~/Library/Developer/Xcode/DerivedData
    


回答2:

You can not use shift-alt-command-k.

shift-alt-command-k - This will delete all of the products and intermediate files in the build folder.It's different from delete derive data.

Yep, the 'Window/Projects' menu choice is missing, so it's all back to manual now.

Go to Prefs/Locations>Derived Data, where you can tap on the tiny arrow at the end of the derived data path to open it in the Finder, however. Then you have to figure out which one you want to remove.

Below is screenshot..

1)

2)2nd way to delete derive data File->Project Setting...



回答3:

You can add an alias to the bash. Open Terminal:

  1. sudo nano ~/.bash_profile

  2. alias DeleteDerivedData='rm -rf ~/Library/Developer/Xcode/DerivedData'

  3. Ctrl + o

  4. Ctrl + x

  5. source ~/.bash_profile

So then, whenever you want to delete the derived data, go to the Terminal and type the alias you've created (DeleteDerivedData).



回答4:

For Xcode Version 8.2 (8C38), you can remove the projects completely (project name in Xcode, programs, data, derived data, etc.) one by one by doing the following: [Note: the instructions are not for just remove the project names from the Welcome Window]

Launch the Xocde and wait until the Welcome window is displayed. The projects will be shown on the right hand side

Right click the project you want to remove completely and a pop window [Show in Folder] jumps out; selec it to find out where is the project in the [Finder]

Right click the project folder in the Finder to find it’s path through [Get Info]; use path in the Info window to go to the parent folder, and go to there

Right click the Project Folder (e.g. DemoProject01) and Porject file (DemoProject01.xcodeproj) and select [Move to Trash] ; you will see that (a) the folder in finder is removed AND (b) the Project in the Xcode Welcome Window’s Project List is removed.



标签: xcode xcode8