Question

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?

Was it helpful?

Solution

  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.

OTHER TIPS

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

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.

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').

Apparently this is a bug in Xamarin Studios, I contacted support and they said that they know about it and its going to be fixed in the next release.

They sent me this link https://files.xamarin.com/~jeff/XamarinStudio-4.2.4.243.dmg which didnt work for me. i tried everything , reinstalling simulator and even reinstalled xcode. But what worked for me was deleting and reinstalling Xamarin Studios. then it all worked again. still not sure whats going. Hope this helps others with same issue cause i know its a big issue on the Xamarin Forums.

sebastian says;

If you want to use the older Xamarin.iOS (7.0.7.2) then you need the older Xcode (5.0.2).

I had the same problem. Changing the Storyboard Id for the ViewController specified in error to something else in Xamarin's iOS designer solved the problem for me.

Deleted bin and obj folders and restarted Rider, working for me now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top