Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load NIB in bundle

People also ask

Could not load nib in bundle bundle?

It happens when you rename the nib file. If you have already, create new nib(meaning copy current nib file contents to new nib), delete old nib file and it will solve your problem.


Visit the properties of the .xib files in the file inspector,the property "Target Membership" pitch on the select box, then your xib file was linked with your target


In Targets -> Build Phases

Make sure the .xib is added to Copy Bundle Resources, if it is not present then add .xib file.


try to find out all

XXXController = [[XXXControlloer alloc] initWithNibName:@"XXXController" bundle:nil];

in your code, and make sure that XXXController are spelled correctly


I had the same problem (exception 'Could not load NIB in bundle: ..') after upgrading my xcode from 3.2 to 4.02. Whereas deploying of my app with Xcode 3.2 worked fine it crashes with xcode 4 raising the exception mentioned above - but only when I tried to deploy to the IOS Simulator (v.4.2). Targeting the IOS device (v.4.1) acted also with Xcode 4.

It turned out (after hours of desperately scrabbling around) that the reason was an almost "hidden" setting in the .xib-file:

Visit the properties of the .xib files in the file inspector: The property 'Location' was set to 'Relative to Group' for all .xib files. I changed it to 'Relative to project' and voila: all .xib files now are correctly loaded in IOS simulator !

I have no clue what's the reason behind that for this odd Xcode4 behavior but maybe it's worth to make an attempt ?