locked
Could not load NIB in bundle after updated to Xcode6 RRS feed

  • Question

  • User4946 posted

    Hello,

    I've recently updated to the lasted Xcode6 and Xamarin.iOS to support iOS8.4 and got a strange error when trying to run the application on simulator. Below is the error message, our application doesn't use storyboard, everything is done programmatically, so there is no such 'MainWindow' mentioned in the error message in our application. I know that Xcode6 has removed the Empty Application template when creating a new project, is there anything we need to modify to this change? BTW, we are using Visual Studio to develop the app.

    MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Could not load NIB in bundle: 'NSBundle (loaded)' with name 'MainWindow' at MonoTouch.ObjCRuntime.Runtime.ThrowNSException (IntPtr nsexception) [0x0000b] in :0 at MonoTouch.ObjCRuntime.Runtime.thrownsexception (IntPtr exc) [0x00000] in :0 at (wrapper native-to-managed) MonoTouch.ObjCRuntime.Runtime:throwns_exception (intptr) at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at MonoTouch.UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in :0 at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalCl

    Many thanks!!

    Yi

    Friday, July 24, 2015 11:36 AM

All replies

  • User181 posted

    It's looking for a MainWindow xib file. Make sure you have one. If you don't expect it to load that then look in your Info.plist.

    Friday, July 24, 2015 2:10 PM
  • User4946 posted

    thanks for your response! We don't have MainWindow xib file or any storyboard files, it is done programmatically. I also checked Info.plist, Main Interface and Launch Stoaryboard are both set to empty string.

    Monday, July 27, 2015 1:41 PM
  • User181 posted

    Look at the Info.plist file as an XML file in a text editor. Maybe the editor is lying to you. Clearly the OS thinks you have one because it's trying to load it. Maybe try a clean build and delete the app from the device or simulator.

    Tuesday, July 28, 2015 3:48 PM