[最佳答案] Yes, you need helper tool. here is the procedure: Create helper "Command Line Tool" target in your Project. For example, named "relaunch" relaunch/main.swift: import AppKit // KVO helper class Observer: NSObject { let _callback: () -> Void init(callback: () -> Void) { _callback = callback } override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer<Void>) { _callback() } } // mai