请教高手ios静态库crash问题,我按照网上的方法创建静态库,但是使用bundle的时候出了问题,2013-05-18 15:31:08.085 testResLib[2721:11303] test link nib
2013-05-18 15:31:08.117 testResLib[2721:11303] initWithNibName bundle = NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)
2013-05-18 15:31:08.118 testResLib[2721:11303] initWithNibName [NSBundle mainBundle] = NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app> (loaded)
2013-05-18 15:31:08.119 testResLib[2721:11303] [NSBundle allBundles] = (
"NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app> (loaded)",
"NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)"
)
2013-05-18 15:31:08.120 testResLib[2721:11303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)' with name 'LYTestViewController''
*** First throw call stack:
(0x1c8f012 0x10cce7e 0x1c8edeb 0x22ffac 0xf4e37 0xf5418 0xf5648 0xf5882 0xf5b2a 0x10cef5 0x10cfdb 0x10d286 0x10d381 0x10deab 0x10e4a3 0x10e098 0x2fc0 0x10e0705 0x17920 0x178b8 0xd8671 0xd8bcf 0xd7d38 0x4733f 0x47552 0x253aa 0x16cf8 0x1beadf9 0x1beaad0 0x1c04bf5 0x1c04962 0x1c35bb6 0x1c34f44 0x1c34e1b 0x1be97e3 0x1be9668 0x1465c 0x26bd 0x25e5)
libc++abi.dylib: terminate called throwing an exception主要是没有load可用bundle到指定的app中。iOS静态库bundle
2013-05-18 15:31:08.117 testResLib[2721:11303] initWithNibName bundle = NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)
2013-05-18 15:31:08.118 testResLib[2721:11303] initWithNibName [NSBundle mainBundle] = NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app> (loaded)
2013-05-18 15:31:08.119 testResLib[2721:11303] [NSBundle allBundles] = (
"NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app> (loaded)",
"NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)"
)
2013-05-18 15:31:08.120 testResLib[2721:11303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/liuyun/Library/Application Support/iPhone Simulator/6.0/Applications/D429A3A3-0C0B-4C95-99A4-5708F8DE2A7A/testResLib.app/TestResource.bundle> (not yet loaded)' with name 'LYTestViewController''
*** First throw call stack:
(0x1c8f012 0x10cce7e 0x1c8edeb 0x22ffac 0xf4e37 0xf5418 0xf5648 0xf5882 0xf5b2a 0x10cef5 0x10cfdb 0x10d286 0x10d381 0x10deab 0x10e4a3 0x10e098 0x2fc0 0x10e0705 0x17920 0x178b8 0xd8671 0xd8bcf 0xd7d38 0x4733f 0x47552 0x253aa 0x16cf8 0x1beadf9 0x1beaad0 0x1c04bf5 0x1c04962 0x1c35bb6 0x1c34f44 0x1c34e1b 0x1be97e3 0x1be9668 0x1465c 0x26bd 0x25e5)
libc++abi.dylib: terminate called throwing an exception主要是没有load可用bundle到指定的app中。iOS静态库bundle
解决方案 »
- oc最简单的错误,我却找不到,大神指点
- html5实现不用swf播放器用video标签播放多mp4文件playlist的问题
- 小问题,大智慧
- 条形码识别是如何实现得?
- 把自己开发的程式的弄到windows mobile的桌面
- 新手请教一个IOS7和IOS6的界面兼容性问题
- 已经使用AMDeviceLookupApplications看到了未越狱Iphone中的应用bound_id,接下来怎么查看应用程序的数据呢?
- NSDate,NSCalendar,制作日历简单实用的方法
- launchscreen.storyboard 强制横屏(iPad)
- 使用autolayout的view能不能像cell一样,高度根据内容自适应啊?
- html文件解析
- 使用UIScrollView 以及UIImageView 实现类似地图 标注效果
有可能你在静态库中用了[NSBundle mainBundle],肯定加载不上,因为静态库所在的bundle不是mainBundle;如果bundle没有读错,但只是加载不上,那就用类似于–loadAndReturnError:和–isLoaded这样的方法来获取是否load成功,如果不成功,就打印loadAndReturnError中的error参数看一看原因。