NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle ios ios

NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle


This error can occur when you rename files outside of XCode.To solve it you can just remove the files from your project (Right Click - Delete and "Remove Reference").

Then after you can re-import the files in your project and everything will be OK.


Simply try removing the ".xib" from the nib name in "initWithNibName:".According to the documentation, the ".xib" is assumed and shouldn't be used.


Well, I think the error says that it can't find a nib file named "RootViewController" in your project.

You are writing these lines of code,

self.viewController = [[RootViewController alloc]      initWithNibName:@"RootViewController_iPhone.xib" bundle:nil];self.viewController = [[RootViewController alloc] initWithNibName:@"RootViewController_iPad.xib" bundle:nil];

At the same time you are asking it to load a nib file named "RootviewController"..!! Where is it..? Do you have a xib file named "Rootviewcontroller"..?