the mystery of the xcode 4 upgrade, three20, and a blank screen on startup

Recently, I upgraded to XCode 4, and one of my Objective C programs stopped working properly.  This particular program uses Three20 to manage the application’s views. 

Upon startup, I would get a blank white screen.  However, if I closed the app by double tapping on the iPhone’s home button, and then switched back to the already-running instance, I would then see the Three20-managed screens and the app would behave normally.

Like most puzzlers, the solution turned out to be really simple, though figuring it out was not at all obvious.  It turns out I had left my NIB referencing a window which I never actually used (since Three20 managed loading and switching between my screens), and the app delegate had an outlet connection that pointed to this unused window.  So, apparently, when I converted the app over to use Three20, I hadn’t cleaned up the NIB to remove the unused outlets and resources. 

This didn’t cause problems with XCode 3 and earlier, but XCode 4 is pickier, I guess.  No problem: the references didn’t belong there anyway.  Once I cleaned up the NIB and corresponding @synthesize and IBOutlet references, the programs worked as expected.