Missing Root View Controller with iT2D 1.4.1 builds against iOS-5
by Brian Szatkowski · in iTorque 2D · 11/22/2011 (9:57 am) · 21 replies
Hi All;
After a mind-wrecking recovery effort to retrieve my files from a corrupt hard drive (long story in and of itself), I'm trying to get my app running once again.
I launch my app, through XCode, and as usual see what I expect. However, there is a new "warning" in the console log that states:
The short of it is that, going forward (and as I understand it should have always been the case that), all apps must implement a root view controller.
I've done some extensive searching on the Apple Dev Forums, Google, Stack Overflow, etc. but to no avail. Every "solution" I came across seems to break things.
Can someone else who has had to deal with this issue please supply the fix?
Thank you.
After a mind-wrecking recovery effort to retrieve my files from a corrupt hard drive (long story in and of itself), I'm trying to get my app running once again.
I launch my app, through XCode, and as usual see what I expect. However, there is a new "warning" in the console log that states:
Quote:
Applications are expected to have a root view controller at the end of application launch
The short of it is that, going forward (and as I understand it should have always been the case that), all apps must implement a root view controller.
I've done some extensive searching on the Apple Dev Forums, Google, Stack Overflow, etc. but to no avail. Every "solution" I came across seems to break things.
Can someone else who has had to deal with this issue please supply the fix?
Thank you.
About the author
Troy Sparks
Default Studio Name
I added the following lines as Don stated above to the applicationDidFinishLaunching method in TGBAppDelegate:
window.rootViewController = [[[UIViewController alloc] initWithNibName:nil bundle:nil] autorelease];
[window.rootViewController setView:window];
After I do this the touch events no longer work on my iPad or in the iPad Simulator (mouse events). If I remove the two lines then I get the dreaded no root view controller found and my app locks up on the iPad but the iPad Simulator now accepts touch (or should I say mouse) input.
I am using iTorque 2D ver 1.5 and the iPad has version 5.1 iOS on it.
Any help on this is greatly appreciated.
Thanks!