I used to have my progress view controller in my current project. Then I decided to move it into a separate library project which I added to my project. I reference the project and it builds successfully. I can use everything from the library.
By “moving” I mean: I copied the XIB, the XIB.DESIGNER and the XIB.CS file to the library and included the XIB in the project and adjusted the namespace.
But when I try to run the application, the controller which I moved cannot be loaded. The error I get is:
Objective-C exception thrown. Name:
NSInternalInconsistencyException
Reason: Could not load NIB in bundle:
‘NSBundle(loaded)’ with name
‘ProgressController’
If I check the iPhone simulator directory and open my APP bundle, I can see a couple of NIB files which all come from my main project. However, the NIB from the DLL is missing. I can see myLibrary.DLL and myLibrary.DLL.MDB as aliases. They point to the BIN/DEBUG directory of my project. No NIBs there either, just the DLL.
I’m totally puzzled. Any ideas?
MonoTouch 3 doesn’t support XIB’s in library projects. This will be supported in MonoTouch 4.