I have this problem, however none of the information I can find on this forum or the internet in general seems to be able to help me.
There seem to be two places where this error can come about:
- main.m - my function looks like this:
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
The last argument in UIApplicationMain
returns an NSString
value of the class of my AppDelegate
. This is therefore working fine.
2.AppDelegate.m - there is an "older" way of setting the root view controller which is like this:
[self.window addSubview:rootViewController];
However, in my app it has already been updated to:
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
So none of the current information on the internet works. It is slightly more puzzling as my colleague can get it to work on his computer perfectly fine - he was the one that sent me the app source code so all the settings and code should be exactly the same.
I am trying to launch this in the simulator. It is built against iOS 5, but I'm trying to run it on the iOS 6.0 simulator.
I have the latest XCode (4.5.1).
Is there any reason this would be happening? And how can I rectify it?
Many thanks
Tom