I’m writing a simple Music controller app using ApplescriptObjC in Xcode but when I click a button to play/pause the music I get “-[AppDelegate playPause:]: Not authorized to send Apple events to Music. (error -1743)”. I understand that this is macOS’s privacy settings kicking in and that I need to enable the usage description, but the thing is I already put the “Privacy - Media Library Usage Description” in info.plist and it’s still not working. Any help would be greatly appreciated.
Here is the handler thats throwing the error, just in case there’s something wrong with it.
tell app "Music" to playpause
I’m having a similar problem, “Not authorized to send Apple events to Contacts. (error -1743)” when trying to add a new contact to Contacts using ApplescriptObjC project.
Found your original post and solution, have set Hardened Runtime to Yes but don’t know where to find Apple Events checkbox, please can you advise me.
Thank you for your rapid response, added the Privacy - AppleEvents Sending Usage Description and set Enable Hardened Runtime to Yes but still issues message “Not authorized to send Apple events to Contacts. (error -1743)”.
Is there anything I have to add to the coding in the app?
Thanks in advance.