Update send to feature to send to TV app on 10.15.
This commit is contained in:
9 files changed
+112
-77
No files matched your search
@@ -254,16 +254,8 @@ final class DocumentWindowController: NSWindowController, TracksViewControllerDe
|
||||
// MARK: Actions
|
||||
|
||||
@IBAction func sendToExternalApp(_ sender: Any) {
|
||||
|
||||
if let filePath = doc.fileURL?.path, let script = NSAppleScript(source: """
|
||||
tell application "iTunes" to add (POSIX file "\(filePath)")
|
||||
""") {
|
||||
|
||||
let result = automationConsent(bundleIdentifier: "com.apple.iTunes", promptIfNeeded: true)
|
||||
if result == .granted {
|
||||
var error: NSDictionary?
|
||||
script.executeAndReturnError(&error)
|
||||
}
|
||||
if let fileURL = doc.fileURL {
|
||||
_ = sendToFileExternalApp(fileURL: fileURL)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user