Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8637089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:23:34+00:00 2026-06-12T10:23:34+00:00

When I am running my app in iPhone 6.0 simulator, it is showing Application

  • 0

When I am running my app in iPhone 6.0 simulator, it is showing

Application windows are expected to have a root view controller at the end of application launch

In other simulators it is not there. Why?
What is the meaning of this error?

The navigation flow of my app is like : First my app should show login screen. After entering in to the app, I need to show one view with tabbar. In that view So many buttons will be there, and when we clicking these button it should show respective viewcontrollers without a tabbar. Thats why i added those navigation controllers to the window.

Here is my code for didFinishLaunchingWithOptions

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.tabBarController = [[UITabBarController alloc] init];
    self.window.rootViewController = self.tabBarController;

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.backgroundColor=[UIColor blackColor];

    [application setStatusBarStyle:UIStatusBarStyleBlackOpaque];

    Object1 = [[Class1 alloc] initWithNibName:@"Class1" bundle:nil];
    tempNav=[[UINavigationController alloc]initWithRootViewController:Object1];
    tempNav.navigationBar.hidden=YES;
    tempNav.view.frame  = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    self.window addSubview:tempNav.view]; 

    LoginObj = [[Login alloc] initWithNibName:@"Login" bundle:nil];
    navController=[[UINavigationController alloc]initWithRootViewController:LoginObj];
    navController.navigationBar.hidden=YES;
    navController.view.frame  = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [self.window addSubview:navController.view];

    Obj2 = [[Class2 alloc] initWithNibName:@"Class2" bundle:nil];
    navController1=[[UINavigationController alloc]initWithRootViewController:Obj2];
    navController1.navigationBar.hidden=YES;
    navController1.view.frame  = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [self.window addSubview:navController1.view];

    Obj3 = [[Class3 alloc] initWithNibName:@"Class3" bundle:nil];
    navController2=[[UINavigationController alloc]initWithRootViewController:Obj3];
    navController2.navigationBar.hidden=YES;
    navController2.view.frame  = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [self.window addSubview:navController2.view];

    Obj4 = [[Class4 alloc] initWithNibName:@"Class4" bundle:nil];
    navController3=[[UINavigationController alloc]initWithRootViewController:Obj4];
    navController3.navigationBar.hidden=YES;
    navController3.view.frame  = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [self.window addSubview:navController3.view];

    [self.window makeKeyAndVisible];

    return YES;  
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:23:35+00:00Added an answer on June 12, 2026 at 10:23 am

    As wattson12 said, you need to do something like this in your app delegate:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
        self.mainViewController = [[MainViewController alloc] initWithNibName:@"MainViewController" bundle:nil];
        self.window.rootViewController = self.mainViewController;    // you need this line!
        [self.window makeKeyAndVisible];
        return YES;
    }
    

    If you haven’t explicitly set the UIWindow rootViewController property, you’ll see this message.

    If you use Xcode 4.5 to create a new project, it should have this code in the template app delegate. If you’re using a project you created in an earlier version of Xcode, that line would probably be missing, and you’d get the warning message.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iPhone app running in the simulator that won't quit. I also
I have an iPhone app running properly in the simulator. Opening screen is a
I have an iPhone simulator app as client and WCF-REST, json encoded service running
I have an app that is running fine in the iPhone simulator by way
My app has been running fine on iPhone simulator. I have hit an issue
I have an app that has been running fine on the iPhone simulator for
I have a GLSL shader program running my iPhone app (it's a very very
I have an iPhone app, which is running only in landscape mode, but recently
I have an app that runs on iPad and iPhone running iOS 3.2, but
I am running my iPhone App on the simulator and looking for leaks using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.