views:

31

answers:

2

I went back to an old project and recompiled it for OS 4.1 succesfully and ran it. I was asked to add a fourth tab to the Tab Bar, but I could not set its class to the newly added ModelsVC.h/.m. [edit: because it did not appear in the class dropdown, but the other viewcontrollers were there.]

I moved the project folder to a backup folder and unzipped a months old backup of the same project. It compiles and runs until the end of viewWillAppear for the first (default) view connected to the first tab, and then does nothing more. It is still running, but nothing is shown and nothing happens.

In the console, it says "Unknown class ModelsVC in Interface Builder file."

The problem is, that class didn't exist two months ago, so why should this way old project complain about it or even know about it?

I'd like to know where to look / tell XCode to use the .xib that is inside the project folder it is currently compiling.

And if it's path-related, how do I check what paths XCode looks in when a project is loaded/compiled?

A: 

For Xcode to run a .xib file inside the project folder, You can just open your xcode, add existing file and it is there.

I think the problem why the old project still runs is that it builds incrementally. That means when it builds the first time, the .xib file was there, and when it build the second time, it doesn't need to add and build the .xib file any more. So, in the second build, even if you delete and move out the .xib file, I think it still can build

vodkhang
Made a clean build, and the result is that a project that worked months ago now shows a black screen with no error message whatever.
Henrik Erlandsson
After some random cleaning and base sdk/target OS versions, and resetting the iPhone simulator, I now have the months old project running. The release/debug dropdown that usually shows Appname|Simulator 4.01|Release (or similar) now displays only 'Release'. But it's running!
Henrik Erlandsson
That's really strange to be honest
vodkhang
It now seems as if I can continue development on the app, I added a viewcontroller and the new xib connections seems to hold. If I were to venture a guess, I'd say having two differently named project folders in the XCode Project folder that have the same .xcodeproject name confuses it (I did at one point), if someone has a better idea I'm all ears.
Henrik Erlandsson
A: 

Seems a 'sloppy copy' for whatever reason (such as a quick backup to try something experimental) of a project folder causes confusion. See this.

Henrik Erlandsson