无法在捆绑错误中加载NIB

时间:2014-04-08 14:14:26

标签: ios xcode parsing storyboard xib

我正在设置解析并遇到一些问题。我正在使用故事板来做到这一点。但是我收到错误说

2014-04-08 23:11:59.802 ParseStarterProject[5729:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/user/Library/Application Support/iPhone Simulator/7.1-64/Applications/CCA0F113-88E5-4181-A5A0-77841C12939E/ParseStarterProject.app> (loaded)' with name 'MainWindow''
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000102d1f495 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010258a99e objc_exception_throw + 43
    2   CoreFoundation                      0x0000000102d1f2ad +[NSException raise:format:] + 205
    3   UIKit                               0x0000000101392742 -[UINib instantiateWithOwner:options:] + 775
    4   UIKit                               0x00000001013942a0 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 138
    5   UIKit                               0x000000010113760d -[UIApplication _loadMainNibFileNamed:bundle:] + 42
    6   UIKit                               0x000000010113693e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 454
    7   UIKit                               0x0000000101147d4c -[UIApplication handleEvent:withNewEvent:] + 3189
    8   UIKit                               0x0000000101148216 -[UIApplication sendEvent:] + 79
    9   UIKit                               0x0000000101138086 _UIApplicationHandleEvent + 578
    10  GraphicsServices                    0x0000000102c4c71a _PurpleEventCallback + 762
    11  GraphicsServices                    0x0000000102c4c1e1 PurpleEventCallback + 35
    12  CoreFoundation                      0x0000000102ca1679 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
    13  CoreFoundation                      0x0000000102ca144e __CFRunLoopDoSource1 + 478
    14  CoreFoundation                      0x0000000102cca903 __CFRunLoopRun + 1939
    15  CoreFoundation                      0x0000000102cc9d83 CFRunLoopRunSpecific + 467
    16  UIKit                               0x00000001011362e1 -[UIApplication _run] + 609
    17  UIKit                               0x0000000101137e33 UIApplicationMain + 1010
    18  ParseStarterProject                 0x0000000100002f83 main + 115
    19  ParseStarterProject                 0x0000000100001fd4 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

为什么我会得到这个,是否有可能修复?

1 个答案:

答案 0 :(得分:0)

关于错误消息和“MainWindow”。我想,你从故事板中删除了一个UIWindow,它仍然在AppDelegate中被引用。

您是否可以通过检查是否存在MainWindow-Class的Zombie-reference来验证这一点?

如果您添加了故事板作为新的主界面:

请确保您还将此新故事板设置为Build目标中的新主界面。因此,转到xCode-Project文件并选择构建目标。在“常规”选项卡中,设置“主界面”以匹配新的故事板 enter image description here