title: iphone app not working ipad simulator
body: <p>My iphone app runs on iphone simulator and devices but not on ipad simulator. It doesnt showing any errors but the application is not launching just blank black screen only displays.</p>
  
  <p>While running in ipad simulator 5 it showing following error "applications are expected to have a root view controller at the end of application launch"</p>
  
  <p>My application didFinishLaunchingWithOptions code is as below :</p>
  
  <pre><code>rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
  [self.rootViewController.view setFrame:CGRectMake(0, 20, 320, 460)];
  [self.window addSubview:self.rootViewController.view];
  
  [self.window makeKeyAndVisible];
  return YES;
  </code></pre>
  
  <p>And my main.m code is as below :</p>
  
  <pre><code> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  int retVal = UIApplicationMain(argc, argv, nil, nil);
  [pool release];
  return retVal;
  </code></pre>
  
  <p>What is the wrong with this???</p>