因未捕获的异常'NSInternalInconsistencyException'Xcode而终止应用程序

时间:2013-04-15 15:42:31

标签: objective-c xcode nib naming uncaught-exception

我最近重命名了我的所有xcode文件名和项目名称,它曾经被称为HelloThere,我已将其更改为BoatTracker并相应地重命名为.h,.m和xib文件。我在xcode中使用折射器重命名功能来执行此操作。 我现在收到错误,我认为这些错误与名称有关。 我已经尝试评论发布声明并重置模拟器和我的Iphone。 我收到的错误是。

模拟器: 所有输出

2013-04-15 16:34:29.672 BoatTracker[22010:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/Mitch/Library/Application Support/iPhone Simulator/6.1/Applications/02CD3764-5212-42F8-A456-408E487C628D/BoatTracker.app> (loaded)' with name 'HelloThereViewController''

***首先抛出调用堆栈:

(0x18a9012 0x1269e7e 0x18a8deb 0x70bef9 0x5d07e7 0x5d0dc8 0x5d0ff8 0x5d1232 0x1ddf 0x4ed1af 0x4ed7a1 0x4ee94b 0x4ffcb5 0x500beb 0x4f2698 0x1ce9df9 0x1ce9ad0 0x181ebf5 0x181e962 0x184fbb6 0x184ef44 0x184ee1b 0x4ee17a 0x4efffc 0x1d5d 0x1c95)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

参见模拟器图片: enter image description here

iPhone:

2013-04-15 16:37:02.925 BoatTracker[153:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/C2023052-697F-40BD-A3FA-A0D5772C6DC0/BoatTracker.app> (loaded)' with name 'HelloThereViewController''

***首先抛出调用堆栈:

(0x345c32a3 0x3c26897f 0x345c31c5 0x36568571 0x36567b9b 0x3646003d 0x363ea46d 0x31459 0x3642bb1d 0x3642b6a3 0x3642384b 0x363cbc39 0x363cb6cd 0x363cb11b 0x380ce5a3 0x34598683 0x34597ee9 0x34596cb7 0x34509ebd 0x34509d49 0x36422485 0x3641f301 0x313ad 0x3c69fb20)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

见Iphone图片: enter image description here

如果您需要任何代码示例来帮助找到问题,请询问。

1 个答案:

答案 0 :(得分:0)

看起来你的XIB(或故事板)仍然引用了HelloThereViewController。在Xcode中更新它可能是最安全的,但您也可以通过在文本编辑器中打开XIB文件来进行搜索和替换。