I know there are other posts with similar questions and I've checked them out but none of them seems to be about my specific issue, so please bear with me.
I'm developing an application which is supposed to run on iPad only, so no universal stuff: the MainWindow nib file is designed for iPad.
The thing is, as long as I run it on the iPad simulator from Xcode (both 5.0 and 5.1) everything works fine. But as soon as I try to run it on an actual iPad (with iOs 5.0) all I get is a blank screen and the "Applications are expected to have a root view controller at the end of application launch" message on the console.
Here's some code that should be relevant:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
...
self.window.rootViewController = self.splitViewController;
[self.window makeKeyAndVisible];
VistaInizialeViewController *inizialeAppoggio = [[VistaInizialeViewController alloc] initWithNibName:@"VistaInizialeViewController" bundle:nil];
self.vistaIniziale = inizialeAppoggio;
[inizialeAppoggio release];
id debug = self.window.rootViewController;
[self.window.rootViewController.view addSubview:self.vistaIniziale.view];
...
debug = self.window.rootViewController;
So what is confusing me is the following: if I run the above step by step on the simulator, the debug variable (the root view controller) is initialized and all, instead if I run it on a real device, it's just nil.
Ok, that's it from me, I'd really appreciate any help with this.
Thanks everybody.