NSInternalInconsistencyException - Could not load NIB in bundle

谁都会走 提交于 2019-12-23 05:48:26

问题


I am getting following exception:

 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/57C8544B-05F6-445D-80A9-FAC9672F278B/MyApp.app> (loaded)' with name 'MyNibName''

I tried number of solutions suggested in stackoverflow's similar questions, but still getting this issue.

This issue is with particular xib file which loads address book.

This occurs only on iPhone and not on iPad and simulator.

I also tried deleting the existing xib file and creating a new one but didnt work out.

With few attempts of testing, I found that the file works fine for certain number of attempts and then starts giving above error only on iPhone.

Please help.

Thanks in advance.


回答1:


Finally after long debugging and testing, I found the issue. The issue was NOT with NIB file, but it was with two nsmutablearrays that I had declared and was populating but not using them. I removed them and then it worked. This was bit strange for me.



来源:https://stackoverflow.com/questions/10792114/nsinternalinconsistencyexception-could-not-load-nib-in-bundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!