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.
- 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.
- Fiddle with the Target Membership Main.storyboard.
- Remove the storyboard from the project, clean, run and then adding the storyboard back again.
- Uninstall Xcode, reinstall Xcode.
- Deleting the Derived Data folder.
- 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
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…