Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find a storyboard named 'Main' in bundle, Xcode 7

I'm having troubles with my project after upgrading to XCode 7. When I run I get an error, "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle". My storyboard name is Main.storyboard.

If I clean my project it runs just fine. I must clean each time I run or I will get the above error.

If found a number of postings with this same error. The various remedies seem to randomly help some people but not others. So far I have tried the following.

  1. Removing the reference to the storyboard in the info.plist file. When I do this the app does start but I get a black screen as it doesn't load the storyboard.
  2. Fiddle with the Target Membership Main.storyboard.
  3. Remove the storyboard from the project, clean, run and then adding the storyboard back again.
  4. Uninstall Xcode, reinstall Xcode.
  5. Deleting the Derived Data folder.
  6. Loading the Storyboard manually with code such as UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];

When I load the storyboard manually it crashes with the same messages as autoloading it.

I saved a copy of my working XCode 6 project before the upgrade and after fussing so much with my project I have tried using a fresh copy of the XCode 6 project that was working but this didn't help.

I've seen a number of posts about this problem where the person just gave up and rebuilt their project from scratch. I'm hoping to avoid this.

My projects info.plist file

like image 353
Mark S Avatar asked Feb 17 '16 17:02

Mark S


2 Answers

Can you tried

Select Target - > General -> Deployment info - > Main interface "Choose your Storyboard name"

May this help you

like image 88
Kamlesh Shingarakhiya Avatar answered Sep 30 '22 18:09

Kamlesh Shingarakhiya


Try this,

Please Check Target Membership in your file inspector.

Its working for me.

like image 22
vijay Avatar answered Sep 30 '22 18:09

vijay