iOS: Getting this message (not an error) on console- Application windows are expected to have a root view controller at the end of application launch
When I Build my app, it compiles without any problems or errors. But when I run it I see this message in console:
Application windows are expected to have a root view controller at the end of application launch.
Here is my Appdelegate's method which I believe might be causing this(based on other posts Ive seen on SO)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; PhotosViewController *viewController = [[PhotosViewController alloc] initWithNibName:nil bundle:nil]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [self.window addSubview:self.navigationController.view]; [self.window makeKeyAndVisible]; return YES;
Is this something that I need to be worried about? My app runs in the simulator even though this message shows up.
Any suggestions on what I should do to get rid of it? What can I do to debug this?
BTW, I have seen other questions on SO with the similar error message, however, none of the scenarios apply to mine so I have posted this question. Its not a duplicate :)
self.window.rootViewController = self.navigationController;
You can find more details in the UIWindow documentation