IOS, object throw exception throw at the very beginning

In the app delegate, I get an exception and I don't know why. Here is the code:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; \\ throw exception on this line return YES; } 

An exception is the following:

 Thread 1: Program received signal: "SIGABRT" 

when the actual exception is displayed on main.m (I did not create it and did not see it):

 int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } 

thanks!

+4
source share
1 answer

Check the xib files. Browse through all the reference outputs and see if there are any references to a property that does not exist.

You can also add an exception to your project (Xcode 4.2):

  • open Breakpoint Navigator
  • "+" in the lower left corner
+1
source

Source: https://habr.com/ru/post/1397191/


All Articles