Mika Kanz
Mika Kanz

Reputation: 9

Thread 1: Signal Sigabt in AppDelegate

I'm working on my first app. Xcode says there are no bugs or issues, but when I try to run the app I get a error message in AppDelegate.swift that say

Thread 1: Signal Sigabt.

Here's my code:

    import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { //This is where the error happens.

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    }

    func applicationWillResignActive(application: UIApplication) {


    }

    func applicationDidEnterBackground(application: UIApplication) {

    }

    func applicationWillEnterForeground(application: UIApplication) {

    }

    func applicationDidBecomeActive(application: UIApplication) {

    }

    func applicationWillTerminate(application: UIApplication) {

    }


}

Upvotes: 0

Views: 91

Answers (1)

Evgeny Karkan
Evgeny Karkan

Reputation: 9612

You should add an exception breakpoint to get more info about crash.

https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html

Steps

  1. In the bottom-left corner of the breakpoints navigator, click the Add button.

  2. Choose Add Exception Breakpoint from the menu.

  3. In the configuration dialog that appears, choose the type of exception on which you want execution to stop from the Exception field pop-up menu.

    • All. Stops on all exceptions.
    • Objective-C. Stops on Objective-C exceptions.
    • C++. Stops on C++ exceptions. To stop on a particular C++ exception, specify the exception name.
  4. For the Break field, choose the phase of the exception handling process at which you want program execution to stop.

  5. (Optional) Add actions and configure the Options for the behavior you wish.

After those steps, build and run your project - and Xcode will stop execution at the crash reason line of code.

Upvotes: 1

Related Questions