14

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?

1

7 Answers 7

43

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

2
  • 1
    It worked! Thank you Ralph! I was afraid for a few moments because the error was replaced by a frightening "Unknown Error" prompt, but after a secondary cleaning, it was nice and easy. Commented Jul 18, 2012 at 18:28
  • 2
    I fixed this error by removing the entry in "Custom iOS Target Properties" named "Main story board file based name", as I didn't have a storyboard.
    – Paul Suart
    Commented Jan 4, 2013 at 1:44
5

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

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

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

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

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

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.