14
votes

Like many of the prior 'MainStoryboard missing in NSBundle' questions, I've got the same prompt but have found no issue with naming and no issue with if the storyboard exists within an area XCode likes.

All the pointers lead to the same file, I've changed my .plist a good 5 times to make it responsive to the same call as found in Build Stages. Now I'm all kinds of tired of this crap because I just want to program, not debug compiler screw ups.

It happened in an instant and now I've been a day and a half without an interface that works. How should I proceed?

7

7 Answers

43
votes

I got the following similar error in XCode 4.3.3:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard'

I fixed it by doing the following:

  1. Make sure your -info.plist has Main story board file based name = MainStoryboard
  2. Right Click on your Story Board file in Xcode and select Delete then References Only
  3. Right Click on your project and select Add Files to [Your Project]
  4. Navigate to the story board file, found in the en.lproj folder in your projects directory and add it
  5. Clean, Recompile and Run and you should find it works.

Got the idea from this SO post: XCode 4.2 MainStoryBoard Not Found

5
votes

Just as a reference to other first timers like me reading through all the SO questions about missing storyboards:

Don't put ".storyboard" at the end of your file name in your plist file. It should look like this:

Main storyboard file base name: MainStoryBoard

3
votes

When you create a new *.storyboard file, Xcode (version to date) doesn't automatically add it into your build resources. To fix this you must add the file under "Copy Bundle Resources".

Select the Xcode project icon and navigate to: Targets > Build Phases > Copy Bundle Resources

Click the + button at the bottom to add the storyboard file.

2
votes

After cleaning my Projekt i have every time this Problem......

My solution is: move the Main.Storyboard intro trash.

Then "Add Files" select your soryboard, after moving the Main.stpryboard from trash zo your desktop.

and, voila. The Error ist gone.

0
votes

Considering that there is not too much information about your problem, My best bet would be to go to the package Info, and see if the Main Storyboard is set to whatever your main storyboard is.

0
votes

As of iOS 9 use just "Main" for storyboard name, worked for me.

0
votes

Ralph Willgoss's steps didn't work for me. I managed to solve it by copying all the viewcontrollers in the storyboard, deleting it (Move to Trash, not Remove Reference), making a new one (rightclicking the project folder and clicking New File, selecting Storyboard) with the same name as the one I deleted and then pasting the copied contents into it.