Hello,
I'm new in IOS programming and I need your help.
When I start my app (Single View Application) in the ios-simulator I become this error:
Thread 1: signal SIGABRT
terminating with uncaught exception of type NSException
code in main.m file:
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); Here is the error
}
}
I dont understand this error.
Thank you for your help.
I think I've figured it out: you said you use a storyboard, but your app is trying to load a nib. That's why it's getting so confused. What you need to do is tell your app that it's supposed to look for a storyboard, not a nib. Here's how:
• Select your project file in the Project Navigator
• In the sidebar with "Projects" and "Targets," select your app under "Targets"
• Click the Info tab
• Expand "Custom iOS target properties" if necessary
• Look for something like "Main nib file base name." If you see it, click it and change it to "Main storyboard file base name."
• Make sure the name to the right matches the name of your storyboard file
• Now build and run.
Hopefully this will clear up the problem. 😉
To recap, an app crashes with the SIGABRT error whenever an exception (a fatal error) is raised and no recovery is possible, such as during the start-up sequence, where any problem is critical.