"Could not find a storyboard named 'MainStoryboard' in bundle NSBundle"

15,122

Solution 1

I would suggest to check that this file is not localized (with no actual localization), to remove the localization and to re-add the file.

If this does not work, have you tried to clone a fresh copy of the project from Git?

Solution 2

  • Select the MainStoryboard.storyboard, from under the project, located in the left panel of the XCode
  • Click the File inspector, on the right side of the XCode.
  • Check the box for Project Target under Target Membership.
  • Do the same for infoplist.strings
  • Clean the project and run it.

OR

  • Remove the files from Copy Bundle Resources
  • Add those two file by clicking + sign.
  • Clean the project and run it.

Solution 3

For what it's worth, I've just had this problem with a fresh project in Xcode 5, trying to set the deployment target back to 5.0. The empty Utility Application would start up fine on simulator on iOS 6+, but would crash with above warning on iOS 5.0/5.1.

Selecting the storyboard in the Project Navigator and File Inspector tab, I found the 'English' icon was plain and unchecked. I checked it:

enter image description here

then clicked on 'Localizable strings', whence I got an alert: enter image description here

After converting, File Inspector looks like this:

enter image description here

and the app no longer crashes. The Project Navigator now shows both Base and English storyboards:

enter image description here

I will leave to someone more knowledgeable to explain what's going on here and what are the consequences of losing the 'Localizable strings' in favour of a proliferation of storyboards...

Solution 4

  1. Go to build phases in your app.
  2. click on 'Copy Bundle Resources'
  3. Find your main storyboard file if not than click on '+' icon in bottom and add your main storyboard file to it.
  4. Now run the project again.
Share:
15,122
Michael
Author by

Michael

Updated on June 21, 2022

Comments

  • Michael
    Michael almost 2 years

    I've been working on a application for a long time now and out from the blue i got this:

    "Could not find a storyboard named 'MainStoryboard' in bundle NSBundle"

    I've red the similar questions here on StackOverflow and i tried everything including: - Renaming the storyboard file - Re-adding the storyboard file - Cleaned the project - Reset contents and setting on the simulator

    I've also checked the plist file and the Copy Bundle Resources and the storyboard name is as it should be. Nothing of this works.

    I'm developing the application with a friend and we are using Git. The weird thing is that the same version works just fine for him.

    However, in the Copy Bundle Resources the MainStoryboard.storyboard and InfoPlist.strings are red. But they have been red for a long time without any troubles. And my friend (for which the project works fine) they are also red.

    enter image description here

    Ideas?