0

My app works fine with iOS 5.1 on both iPad and iPhone. In iOS 6 app works fine on iPad but crashes in iPhone while setting the window.rootViewController = navigationViewController. I have set Exception break point which stops execution at this piece of code in application didFinishLaunchingWithOptions. I even tried adding it as [window addSubView:navigationViewController.view] but no luck. Has any one faced similar issue.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     rootViewController = [[SpringboardViewController alloc] initWithNibName:@"SpringboardViewController" bundle:nil];   
     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:rootViewController];

    self.window.rootViewController = nav;
    self.window makeKeyAndVisible];
    return YES;
}
psubsee2003
  • 8,563
  • 8
  • 61
  • 79
kaar3k
  • 994
  • 7
  • 15
  • Could you post didFinishLaunchingWithOptions method inside code – Ravindhiran Feb 19 '13 at 06:20
  • This works completely fine with iPhone and iPad ios 5.1 also with ios 6.0 iPad problem is only with iPhone 6.0 .I have pasted the code above.Debugger stops at `self.window.rootViewController = nav ;` without any error log.It just prints **lldb** in the console. – kaar3k Feb 19 '13 at 06:50

2 Answers2

0

could you write an exception ?

take a look at these questions

applications expected to have a root view controller console

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

Community
  • 1
  • 1
ogres
  • 3,660
  • 1
  • 17
  • 16
  • ogres thanks for your reply but my app works fine with 5.1 problem is only with iPhone 6.0 also there is no error which shows up to provide more information about my issue. – kaar3k Feb 19 '13 at 06:52
0

Thanks for your replies guys i figured out the problem ,problem was with the application supportedInterfaceOrientationsForWindow where i was returning UIInterfaceOrientationPortrait instead of UIInterfaceOrientationMaskPortrait since app debugger was struck at self.window.rootViewController = nav, i thought problem was with this statement.

Thanks Ravindharan and Ogres.

kaar3k
  • 994
  • 7
  • 15