Could not load NIB in bundle: 'NSBundle'

James K. picture James K. · Feb 24, 2011 · Viewed 42.6k times · Source

What is the error listed below?

2011-02-23 21:24:12.218 Success[7238:207] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/jimkillen12/Library/Application Support/iPhone Simulator/4.2/Applications/BAA5E0E7-AF12-4301-A4F8-1B9797C9E82D/Success.app> (loaded)' with name 'MainWindow-iPad''

Answer

Baig picture Baig · Dec 25, 2012

One of your NIB file is missing from project, add the required NIB file:

In Build Phases

  1. expand Copy Bundle Resources
  2. click + at bottom
  3. add the required NIB file.

Clean your build by Shift+Cmd+K, then run.

P.S. Also make sure to use exact spelling of NIB file while calling initWithNibName:@"ViewNameController"

Probably, you have named your NIB in a call by lowercase letters or you may have also included extension .xib which is not required.