xcode 如何在 Xcode8 中“删除派生数据”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38227783/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:19:30  来源:igfitidea点击:

How to "Delete derived data" in Xcode8?

xcodexcode8

提问by oyalhi

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

在 Xcode7 中,单击 Window -> Projects 并选择要删除派生数据的项目。

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

但是对于Xcode8 beta 2,Windows 菜单下不再存在项目菜单。有没有什么快速的方法可以通过Xcode8接口删除派生数据?

回答by Ghulam Rasool

  • Close Xcode
  • Open Terminal and enter this command

    rm -rf ~/Library/Developer/Xcode/DerivedData
    
  • 关闭 Xcode
  • 打开终端并输入此命令

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

回答by Bhoomi Jagani

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

您不能使用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.

shift-alt-command-k- 这将删除构建文件夹中的所有产品和中间文件。它与删除派生数据不同。

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.

转到首选项/位置>派生数据,您可以在此处点击派生数据路径末尾的小箭头以在 Finder 中打开它。然后你必须弄清楚你想删除哪一个。

Below is screenshot..

下面是截图。。

1) enter image description here

1) 在此处输入图片说明

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

2)删除派生数据文件的第二种方法->项目设置...

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

回答by eMdOS

You can add an aliasto the bash. Open Terminal:

您可以alias在 bash 中添加一个。打开终端

  1. sudo nano ~/.bash_profile

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

  3. Ctrl + o

  4. Ctrl + x

  5. source ~/.bash_profile

  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 Terminaland type the alias you've created (DeleteDerivedData).

因此,无论何时您想删除派生数据,请转到终端并键入您创建的别名 ( DeleteDerivedData)。

回答by JubiAudio

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]

对于 Xcode 8.2 (8C38) 版本,您可以通过执行以下操作将项目(Xcode 中的项目名称、程序、数据、派生数据等)一一删除:欢迎窗口中的名字]

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

启动 Xocde 并等待欢迎窗口出现。项目将显示在右侧

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]

右击要完全删除的项目,弹出一个弹出窗口【在文件夹中显示】;选择它以找出[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

在 Finder 中右键单击项目文件夹,通过【获取信息】找到它的路径;使用信息窗口中的路径转到父文件夹,然后转到那里

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.

右键单击项目文件夹(例如 DemoProject01)和项目文件(DemoProject01.xcodeproj)并选择 [Move to Trash] ;您将看到 (a) finder 中的文件夹被删除,并且 (b) Xcode 欢迎窗口的项目列表中的项目被删除。