0
votes

Out of the blue I started getting a "NSInternalInconsistencyException" when building my XCode project. The message stated that it "could not load nib in bundle... MainWindow".

After checking through my project structure I noticed that the default MainWindow.xib and Info.plist files were missing from the Resources directory. In fact, the Resources directory itself was missing.

As I back up my project directory with git, I tried reinstating multiple older versions of the .xcodeproject sub-directory. Oddly, the tree structure of the project appears to update when an older version is recovered, except that the Resources directory is still missing.

I've also tried creating a new folder called "Resources" and then adding the missing files. I can add MainWindow.xib, but Info.plist is greyed out in the file selector and can not be added.

I'm tempted to simply create a new project, and add in all of my existing files.

1

1 Answers

0
votes

I had a similar problem yesterday when I moved a project between workstations. I copied my project folder to a new workstation and then tried to build. The build kept throwing NSInternalInconsistencyExceptions in the simulator. Upon examining my project files, I noticed that the MainWindow.xib was missing, probably because I changed the filename a long time ago. However the project still works on the old workstation because it's probably still some how linked.

How I finally solved it was that I created a new project just to copy the new MainWindow.xib file. I copied that new MainWindow.xib to my moved project. Then I went into Interface Builder and made sure that the application delegate was properly assigned. I can now build the project on my new workstation and it runs as on the old, however YMMV.