Moose
Moose

Reputation: 1

XCode crash caused storyboard to disappear

After my XCode crashed my main.storyboard file is red with a D next to it. When I try to build my project it fails and gives me the error "Interface Builder Storyboard Compiler Error: Interface Builder could not open the document Main.storyboard because it does not exist" When I go to my Base.lproj the file is no longer there. I didn't delete my storyboard can anyone explain why this is happening and how to fix it?? I'm on Xcode 6.1.1

Upvotes: 0

Views: 155

Answers (2)

Vladimir
Vladimir

Reputation: 170859

'D' button in xcode probably means that your project is under some kind of version control system. In that case you can simply revert the changes to your file from xcode. Right-click on the deleted file and choose "Source Control -> Discard changes to ..." in menu

You can also discard changes to your file from terminal using the following command:

git checkout -- file

Upvotes: 1

Majid Bashir
Majid Bashir

Reputation: 568

  • you can add it in you project by right clicking any file and add files to "project name" instead of New File, it will open Finder , where your project resources are included. Check for the file named Main.StoryBoard and click open.
  • Incase you have deleted (Accidentally) open trash and check if it is present there. Right click it and check Put Back and do the above procedure.

Upvotes: 0

Related Questions