Could not load NIB in bundle: 'NSBundle.....

学习NSNotification时遇到了这个问题,错误日志如下:

2015-08-28 17:47:24.617 NSNotificationDemo[7158:786614] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/18D95FA1-2AA9-48B8-9528-4FD9B9B65B75/NSNotificationDemo.app> (loaded)' with name 'ViewController''
*** First throw call stack:
(0x287910d7 0x36c23c77 0x2879101d 0x2c1c32a9 0x2c0da987 0x2bf0e6dd 0x2bdf2349 0x2bdf22cd 0x2bdf83f7 0x2bdf5d6f 0x2be60e91 0xebad9 0x2be5dc85 0x2c05426b 0x2c05690f 0x2c0615e9 0x2c0550c7 0x2f265ec1 0x28757035 0x287562f9 0x28754e53 0x286a06d1 0x286a04e3 0x2be57867 0x2be52445 0xebc3d 0x371f1aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException

下面两个网址提到了这个问题,检查过之后问题依旧存在,目前还在寻求解决方法中……

1. http://blog.csdn.net/itianyi/article/details/8547895

2. http://www.cocoachina.com/bbs/read.php?tid=265037

总算找到解决方法了!把AppDelegate的application:didFinishLaunchingWithOptions:方法中原来的内容注释或删除就OK了 !

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    return YES;
}

至于原因,觉得应该是版本的问题把……

附上Demo的下载地址  http://download.csdn.net/detail/jk199054/4077865,介绍的很不错!简洁明了!

原文地址:https://www.cnblogs.com/jaxer/p/4767539.html