Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Studio. Monotouch. Could not load NIB in bundle ... with name

When I test the app on the simulator, I get the following:

Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle <...> (loaded)' with name '...Controller'

But when I use the actual device everything is fine.

Any ideas?

like image 414
nightsnaker Avatar asked Aug 29 '13 10:08

nightsnaker


4 Answers

  1. Deleted all the controls in the xib, made my UI fully generated in code. Did not help.
  2. Deleted both .cs and .xib files, created a new iphone controller, pasted the code. Still did not help in spite of the new empty xib!
  3. Renamed my controller class name. Reinstalled the app in simulator. Resolved! PS. I tried reinstalling the app before step 1. And that did not help. So I do not know what exactly resolved the problem.
like image 164
nightsnaker Avatar answered Nov 15 '22 01:11

nightsnaker


In your Info.ptlist , check if your "Main Interface" is correct

like image 23
Eduardo Avatar answered Nov 14 '22 23:11

Eduardo


Using Xamarin Studio on the Mac, I got this error. Also my iOS emulator was acting kind of strange too...I first cleared the programs and settings from the emulator, but that didn't help. So then I just rebooted the Mac. This solved the problem.

like image 38
Scott Emick Avatar answered Nov 15 '22 01:11

Scott Emick


I was having the same problem - what fixed it for me was to make sure that under Properties, the .xib file had a build action of 'InterfaceDefinition' (instead of 'None').

like image 26
ehuna Avatar answered Nov 14 '22 23:11

ehuna