6

I just accidentally deleted some files form Xcode proj , but I am sure I pressed the remove reference only button , 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 !!!

iOS.Lover
  • 5,923
  • 21
  • 90
  • 162

2 Answers2

17

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
Mc.Lover
  • 4,813
  • 9
  • 46
  • 80
1

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?

Jesse Bunch
  • 6,651
  • 4
  • 36
  • 59
  • my images were in a folder in my Xcode project folder and I dragged them into Xcode , and the only source was there . No unfortunately I am not using Time Machine :( – iOS.Lover Jan 15 '12 at 23:14
  • Bummer. In the future, I would really look into at least checking the "Create a local Git repository" box when you create your projects. That'll help you avoid those situations (provided you commit frequently). Also, I would buy a cheap $100 hard drive and enable Time Machine while you're working. It'll pay for itself *when* something like this happens again. – Jesse Bunch Jan 15 '12 at 23:19