从 Xcode 恢复已删除的文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8874174/
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-14 23:00:30  来源:igfitidea点击:

Recovery deleted files from Xcode

iphoneiosxcodeipadsdk

提问by Mc.Lover

I just accidentally deleted some files form Xcode proj , but I am sure I pressed the remove reference onlybutton , but all of my images have deleted from my project and I can't locate them on my hard , is there anyway to recover these images ? there is no sign of images in trash !!!

我只是不小心从 Xcode proj 中删除了一些文件,但我确定我按下了remove reference only按钮,但是我的所有图像都从我的项目中删除了,我无法在硬盘上找到它们,无论如何可以恢复这些图像吗?垃圾桶里没有图像的迹象!!!

回答by Momi

DON'T PANIC AND BE HOPEFUL ,

不要恐慌并充满希望,

  • check out your last Device or Simulator build on the Product folder
  • select your file and click reveal in finder
  • then right click on you app file and select Show package content , if you be lucky your lost files would be there
  • 在 Product 文件夹中查看您的最后一个设备或模拟器版本
  • 选择您的文件,然后单击在查找器中显示
  • 然后右键单击您的应用程序文件并选择显示包内容,如果幸运的话,您丢失的文件会在那里

回答by Jesse Bunch

Xcode doesn't move them if you click "Remove References Only." That means if you can't find them on your hard drive now, they're probably lost. Please tell me you were using source control? Or, at the very least, Time Machine?

如果您单击“仅删除引用”,Xcode 不会移动它们。这意味着如果您现在在硬盘驱动器上找不到它们,它们可能已经丢失了。请告诉我您使用的是源代码管理吗?或者,至少,时间机器?