Github のこのチュートリアルに従って、SwiftyDropbox の使用方法を試してみましたが、このエラーが発生しました。
import UIKit
import SwiftyDropbox
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { //スレッド 1: シグナル SIGABRT
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
DropboxClientsManager.setupWithAppKey("qcvovib4h1mn0zd")
return true
}
これが私が出力ボックスに入れているものです
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)
これが私のViewControllerコードです
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.
}
}
エラーを修正するにはどうすればよいですか?