Reauthorising applet to send AppleEvents to another applet in macOS Mohave | Please Help

My applet includes a helper applet in the resources directory of its bundle. The helper applet remains in the background only and displays notifications through Notification Center even if the main applet is in the foreground, as I find it less disruptive to workflow sometimes to have notifications through Notification Center rather than modal dialogs.

Of course in Mohave my main applet needs authorisation to send AppleEvents to the helper applet. Until now that hasn’t been a problem.

But last night I released a new version of my applet and suddenly it’s encountering an error that it’s not authorised to send AppleEvents to the helper applet.

I checked in SystemPreferences > Security and Privacy > privacy > Automation and the helper applet doesn’t appear under my main applet, checked or unchecked.

No worries, I thought, I’ll just reset all authorisation settings and start again.

So I did tccutil reset AppleEvents from Terminal and ran the applet again but it still gets the not authorised to send AppleEvents error.

I can send AppleEvents to the helper applet using Script Editor but not Script Debugger. SD also gets the not authorised message.

I’m never prompted to grant permission etc; it’s as if SD and my main applet are on the blacklist and so AppleEvents just fail without any prompt. Even after tccutil reset AppleEvents. And of course the helper applet still doesn’t show up in SystemPrefs > Security and Privacy > privacy > Automation.

Any thoughts or suggestions? I’m guessing there’s no hope of there being any way to get more comprehensive info from tccutil about what’s authorised and what’s not etc.

The only relevant thing I can think of that changed between the current version of my applet and the older version when everything was working is that I did change the name (and bundle name) of my main applet (not the helper applet), though the bundle id of the main applet stayed the same. I suppose changing the bundle name could cause some issues but the fact that the issues continue even after tccutil reset AppleEvents is weird.

One work around I thought of is to try changing the name or even bundle id of the helper applet in hopes that tccutil would see it as a different app and then prompt me for permission to send it AppleEvents, but I’d prefer not to do/try that if I can avoid it.

Can you send it to me off-list?

1 Like

Thanks, Shane – done.