I'm using XCode 4 to develop an application that can be run on iPhone 3.1.3. On iOS4 Simulator works fine, but on my device, I get an error.
This is AppDelegate code where I get the error.
@implementation VoConstructorAppDelegate @synthesize window=_window; @synthesize viewController=_viewController; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; } I get the following error in self.window.rootViewController = self.viewController;:
2011-07-07 15:10:20.997 VoConstructor[159:207] *** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x11a9e0 2011-07-07 15:10:21.053 VoConstructor[159:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIWindow setRootViewController:]: unrecognized selector sent to instance 0x11a9e0' Any advice?