I need my Mac Swift app uses the System Events (via Applescript) to close any app that user adds to a list. I see in my System Preferences a lot of apps having System Events access in Automation panel (e.g. 'Google's backup and sync' or 'Divvy'). How can I ask permissions for that?
In Info.plist add the key NSAppleEventsUsageDescription
in Source Code view
<key>NSAppleEventsUsageDescription</key>
<string>$(PRODUCT_NAME) needs to control System Events</string>
or Privacy - AppleEvents Sending Usage Description
in the popup menu in Property List view.
The <string>
value is an arbitrary description.
Moreover in Xcode 11 where Hardened Runtime is enabled you have to check the Apple Events
checkbox
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With