AppleScript from within another Mac application
CompletedI am a macOS developer. I’d like to support nvUltra in my macOS app.
I’ve developed the necessary AppleScript using what is available in nvUltra 1.0.0 (55).
I used the good old ScriptEditor to develop and test. This is working as expected.
I sell my app through the Mac App Store and therefore must comply with the privacy rules in Catalina.
My app must programmatically request permission to use AppleScript from the end user.
This is in addition to having the required entitlements….
The macOS function to request permission is:
OSStatus AEDeterminePermissionToAutomateTarget( const AEAddressDesc* target, AEEventClass theAEEventClass, AEEventID theAEEventID, Boolean askUserIfNeeded )
When I run this function against nvUltra I receive this response: errAEEventNotPermitted
(from AppleEvents.h. [CoreService/AE)
/* Mac OS X 10.8 and later, the target of the AppleEvent does not allow this sender to execute this event */
This result means my app cannot obtain the permission which further means my app cannot execute the AppleScript.
I have successfully run this function against 20 other applications and not run into this problem, so this result is perplexing.
0
-
A few possibilities:
1. nvUltra Beta is not sandboxed, so I'm not sure how that works in this situation
2. It seems that a special Info.plist field may be required(?), which is not in nvUltra's Info.plist. You could try adding that and see if then works for you? Or perhaps it will not work until a final release, which will be sandboxed? Or something else??
Fletcher
0 -
Reported as solved via email response. Thanks Steve!
0
Please sign in to leave a comment.
Comments
2 comments