Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS app Crash due to "Could not load NIB in bundle"

Tags:

xcode

ios

iphone

when i run the simulator there is a crash and i don't know why it give me this " Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'ViewController_iPhone''" could anyone help me ?

like image 682
JaNa Saadeddin Avatar asked Jul 26 '12 07:07

JaNa Saadeddin


2 Answers

Are you sure that a "ViewController_iPhone.xib" file has been added to your project?

Either add it to your project/target, or (if it already there) check the nib name you are using on the statement that is causing the crash, or check your info.plist file if the crash happens at startup.

If everything is correct, clean your project and build again.

like image 78
sergio Avatar answered Oct 29 '22 02:10

sergio


I got the same, when working on iOS7 and get the crash when running on iOS6

To solve it:

If you are using xCode5 you should go to your Xib file and change the "Interface Builder Document" to view as iOS6.1 or earlier or change the "opens in" xcode version to 4.6 instead of 5.0

It solved the issue for me

like image 35
Ronen Morecki Avatar answered Oct 29 '22 01:10

Ronen Morecki