Thread 1: signal SIGABRT Error

First of all thanks for your time if you respond to this. I am getting the Thread 1: signal SIGNBRT Error. I underlined the line of code in which it's happening.


import UIKit

@UIApplicationMain

internal class appDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

/

return true

}

func applicationWillResignActive(_ application: UIApplication) {

/

/

}

func applicationDidEnterBackground(_ application: UIApplication) {

/

/

}

func applicationWillEnterForeground(_ application: UIApplication) {

/

}

func applicationDidBecomeActive(_ application: UIApplication) {

/

}

func applicationWillTerminate(_ application: UIApplication) {

/

}

}





Once again thanks for your time!

Replies

When using a sigabrt error as a starting point, it can help to remember that they tend to be rather generic/non-specific. More like a derp than an aha.


They simply mean the live signal between the simulator/device and Xcode has been aborted/dropped/stopped/cut off. They do not tell you exactly why. If they are accompanied by a lack of highlighted errors w/clues about them in your code, consider that as an indication the issue(s) is somewhere else...such as Interface Builder.


Check all your code/button etc. connections with your UI elements via Interface Builder for starters, being sure to option-clean if you make changes. In some cases, it can be a matter of deleting, then re-doing those connections, even if they appear ok on the surface. Another example would be a lingering no longer needed connection to an outlet that no longer exists. In IB, using the list that names your view controllers and buttons, etc. you can select one and then right click to see/edit the outlets/connections.


A common troubleshooting tactic is to pepper your code with breakpoints, then stepping thru as it runs until that error pops up. If it's something you need to correct via IB, you may at least be able to isolate which connection is acting out. If it's something else, and you can't see the problem, copy that block of code into a comment here so someone can take a closer look. Be sure to use the editor's code brackets <> like this:


import UIKit
@UIApplicationMain
internal class appDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {


See Xcode Help on breakpoints if you need details on their use.


Good luck.