问题
I am attempting to make an app without using StoryBoard. I am instantiating my root view controller from the AppDelegate
When I run my app I get the following SIGABRT.
*** Assertion failure in -[UIStoryboard initWithBundle:storyboardFileName:identifierToNibNameMap:identifierToExternalStoryboardReferenceMap:designatedEntryPointIdentifier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3486.4/UIStoryboard.m:63
2015-07-26 18:42:54.204 NarwhalFeed[3783:2840317] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: nibNameMap != nil'
*** First throw call stack:
When I open my main.storyboard file I don't have any UIViewController
marked as "Is Initial View Controller" found in the Attributed inspector. But when I choose the view controller as initial view controller the app runs fine. Is this is a bug in xcode 7 beta?
回答1:
You need to remove the reference to your storyboard file from the "Main Interface" section of your target's settings in Xcode. If the storyboard is still referenced in that section then the start-up code will try an instantiate your initial scene even though you are going to replace it with your own view.
If your storyboard doesn't contain an initial scene then you get an exception. This behaviour is not new to iOS 9.
来源:https://stackoverflow.com/questions/31642741/xcode-7-beta-3-storyboard-bug