0
votes

I have a major problem. My app was working perfectly fine back in xcode 4.2 and in iOS 5.0. However, when I updated to xcode 4.3.2 and iOS 5.1, I ran into an issue.

When I try running my app now, ios simulator comes up with my splash screen and then a blank white screen with a status bar. I also get

2012-04-08 20:46:48.025 Birdflix[67666:fb03] Application windows are expected to have a root view controller at the end of application launch

in the log.

Please help, I really need to publish my app. Thanks in advance.

2

2 Answers

0
votes

Please set self.window.rootViewController in the application:didFinishLaunchingWithOptions: method in AppDelegate.m.

0
votes

Sorry, I haven't Xcode4.3.2, not always say rightly.

xcode 4.2, don't use MainWindow.nib, so you should specify self.window.rootViewController.

the rootViewController is the ViewController that AppDelegate's view controller in previous version's MainWindow.nib.

Suppose the class is RootViewController, then

#import "RootViewController.h"
- (BOOL)application:(UIApplication *)application 
          didFinishLaunchingWithOptions:(NSDictionary *)launchOptions   
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    self.window.rootViewController = [[RootViewController alloc] init]; 
    [self.window.makeKeyAndVisible];

     return YES:
}