0

I was running my program whenn it crashed and gave me a error of NSInternalInconsistencyException reason: Could not load NIB in bundle can anyone help please

3
Contributors
2
Replies
24
Views
4 Years
Discussion Span
Last Post by bondo
0

Build it with the debug flags enabled and then run it in the debugger. It is either that, or sprinkling a bunch of print statements through your code to help isolate the problem. For core dump exceptions like this, I find that running in the debugger is the better choice. For non-fatal, but inappropriate behavior (wrong output for given input for example), then diagnostic print statements can be very useful.

0

You can get this error if you are trying to load a nib file that doesn't exist in the bundle.

Say you are doing something like this:

UIView* view = [[UIView alloc] initWithNibName:@"MyNibFile" bundle:mainBundle];

or this:

NSArray* objects = [[NSBundle mainBundle] loadNibNamed:@"MyNibFile" owner:nil options:nil];

The two reasons I usually get this is either 0) The nib file name is misspelled (the solution to this is obvious) or 1) The nib file isn't being compiled into the target I'm building. To fix this, select your nib file in your project navigator and open the file inspector and make sure that the Target Membership is correctly set.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.