Skip to content

Commit

Permalink
fix: app blocked when requesting AE permission
Browse files Browse the repository at this point in the history
  • Loading branch information
melchor629 committed Sep 11, 2021
1 parent 228db62 commit 630fe92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iTunes Scrobbler/services/MusicService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ end tell
private func checkAppleScriptPermission() {
if #available(macOS 10.14, *) {
if !isRunning { return }
// on macOS 11 it seems it is blocking the AE call,
// but request is still raised when using AE.
if #available(macOS 11, *) { return }
//See https://www.felix-schwarz.org/blog/2018/08/new-apple-event-apis-in-macos-mojave
let desc = NSAppleEventDescriptor(bundleIdentifier: "com.apple.Music").aeDesc!
let status = AEDeterminePermissionToAutomateTarget(desc, 0x61657674, typeWildCard, true)
Expand Down

0 comments on commit 630fe92

Please # to comment.