简体   繁体   中英

NSInternalInconsistencyException - Could not load NIB in bundle

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM