Xcode 4.3 and empty application template

Discussion in 'iOS Programming' started by pnyinyi, Mar 8, 2012.

  1. pnyinyi macrumors newbie

    Mar 8, 2012
    I used empty application template to create a project on Xcode 4.3. I used empty application template because I wanted to use core data. I created the storyboard and added it to the project. When I ran it, it says rootviewcontroller is required. I am using the navigationcontroller. I tried to set rootviewcontroller to self.navigationController in app delegate class, but I can't. Thanks in advance for the solutions.

  2. anedwar macrumors newbie

    Feb 10, 2012
    North Carolina
    Couple things to try

    1. make sure you set the Main storyboard for your target to the storyboard you created.

    2. In your AppDelegate.m file

    remove the following lines from the
    - (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];
    [self.window makeKeyAndVisible];

    Just tested this on a quick project and it got rid of the error message you were seeing

Share This Page