Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode deployment error: 'NSInvalidArgumentException', Could not find a storyboard named 'MainStoryboard'

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?

like image 893
Harrison Harbers Avatar asked Jul 17 '12 22:07

Harrison Harbers


People also ask

How to find storyboard name in Xcode?

plist file. Expand "Application Scene Manifest". Expand "Scene Configuration". Expand the item 0 under "Application Sessions Role" and then change the storyboard name there.

Can t find Main storyboard Xcode?

If you're missing Main. storyboard, it's probably because you forgot to change the User Interface setting to Storyboard when you created the project. If you leave it set to SwiftUI, then Main. storyboard doesn't get created.

How do I delete a storyboard in Xcode?

Step 2: Delete the Storyboard Your new project has been created, now navigate to the left side of your interface, select the “Main. storyboard” file in the main folder, left-click and hit delete.

What is UIStoryboard?

A UIStoryboard object manages archived versions of your app's view controllers. At design time, you configure the content of your view controllers visually, and Xcode saves the data needed to recreate that interface in a storyboard file in your app's bundle.


2 Answers

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

like image 166
Ralph Willgoss Avatar answered Oct 19 '22 18:10

Ralph Willgoss


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

like image 31
nagem Avatar answered Oct 19 '22 19:10

nagem