Signal SIGABRT error in App Delegate??

Whenever I try to use a certain function in my app I get an error in in xcode. It open's the app delegate, and it says


thread 1: signal SIGABRT


Here's the code: The error message appears on line 2


@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        /
        return true
    }
    func applicationWillResignActive(application: UIApplication) {
        /
        /
    }
    func applicationDidEnterBackground(application: UIApplication) {
        /
        /
    }
    func applicationWillEnterForeground(application: UIApplication) {
        /
    }
    func applicationDidBecomeActive(application: UIApplication) {
        /
    }
    func applicationWillTerminate(application: UIApplication) {
        /
    }
}



Can you help me get rid of this?

Accepted Reply

> I did the same thing for both of them.


Does that mean you made one then used copy/paste, or did you make one, verify it worked, then manually made the other using the same process as the one that worked, and it didn't or did it break the first one, or?


You might want to delete the connection for the broken one, do an option-clean build folder, then redo it and test.

Replies

In some Swift runtimes, the code for "aborting by error" is embedded at the top of `AppDelegate`, so even if Xcode is pointing at the line 02, the actual cause of the error resides somewhere else. (Maybe in another class of another file.) Check the stack traces and all console outputs and seek where your issue is hiding.

I'm using the SWRevealViewController. Whenever I click on the "Lable 1" table cell in the menu, it doesn't open, it freezes the app and I get the SIGABRT error in xcode. Whenever I click on the "Lable 2" table cell, It opens the view controller. I did the same thing for both of them. What is happening? 🙂

> I did the same thing for both of them.


Does that mean you made one then used copy/paste, or did you make one, verify it worked, then manually made the other using the same process as the one that worked, and it didn't or did it break the first one, or?


You might want to delete the connection for the broken one, do an option-clean build folder, then redo it and test.

It sounds like you may have an old action in your storyboard/nib associated with Label 1 that doesn't exist anymore in the code. When the runtime can't find the action, the app crashes.

Thanks everyone for the help! I fixed it! I just deleted the view controller I wanted the button to go to and recreated it. It worked. Thanks everyone!

You da' man - thanks for the followup and good luck w/your app(s).