Проблема в названии. Я хочу выполнить команду, когда кнопка нажата, но когда я нажимаю на кнопку, Xcode возвращает меня Невозможно создать плагин (0xe00002be). Вот мой код:
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
@IBOutlet weak var window: NSWindow!
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
@IBAction func applyBacklight(_ sender: NSButton) {
let task = Process()
task.executableURL = URL(fileURLWithPath: "/usr/bin/osx-razer-led")
task.arguments = ["static blue"]
task.launch()
}
}