What can I do to fix the error "Thread 1: signal SIGABRT"?

225 views Asked by At

I'm following this tutorial on Github to try and learn how to use SwiftyDropbox, but I've run into this error

import UIKit
import SwiftyDropbox

@UIApplicationMain

class AppDelegate: UIResponder, UIApplicationDelegate { //Thread 1: signal SIGABRT

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        DropboxClientsManager.setupWithAppKey("qcvovib4h1mn0zd")
        return true
    }

Here's what I'm getting in the output box

2016-12-29 15:41:23.576964 GaethrExample[1164:292818] -[GaethrExample.ViewController launchDropbox:]: unrecognized selector sent to instance 0x102809370
2016-12-29 15:41:23.583475 GaethrExample[1164:292818] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GaethrExample.ViewController launchDropbox:]: unrecognized selector sent to instance 0x102809370'
*** First throw call stack:
(0x18b6a61c0 0x18a0e055c 0x18b6ad278 0x18b6aa278 0x18b5a459c 0x191536484 0x191536404 0x1915208b8 0x191535cf0 0x191535818 0x191530a60 0x19150152c 0x19f54953c 0x191ceea54 0x191ce84bc 0x18b654278 0x18b653bc0 0x18b6517c0 0x18b580048 0x18d006198 0x19156c2fc 0x191567034 0x1000d5b58 0x18a5645b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Here's my ViewController code

import UIKit
import SwiftyDropbox


class ViewController: UIViewController {
    @IBOutlet weak var launchDropbox: UIButton!

    @IBAction func launchDropboxPressed(_ sender: Any) {
        DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: self,
                                                      openURL: { (url: URL) -> Void in
                                                        UIApplication.shared.openURL(url)
        })
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }



}

What do I need to do to fix the error?

0

There are 0 answers