Tuesday, September 17, 2019

#1 2019-06-04 05:25:18 pm

zevrix
Member
Registered: 2012-08-01
Posts: 20

Apple Event authorization dialog never shows up

Hi all,


I wonder if anyone ever ran into the following weird issue:

The Apple Event authorization dialog stops showing up for one particular app - which, naturally, renders the app useless. I'm referring to the dialog "“The App“ wants access to control “Another App“... with the Allow/OK buttons.

More details:

-The app just returns an error "Not authorized to send Apple events to Finder" (same for System Events). The aforementioned authorization dialog never shows up.

-The app does not appear in System Preferences > Privacy > Automation list.

-Resetting authorizations with "tccutil reset AppleEvents" doesn't make any difference (as there's nothing to reset for this app anyway).

-This is one of my own apps I'm developing in Xcode.

-The problem started out of the blue yesterday. The app functioned as expected before that - and users never reported this issue either.

-I don't have this issue with any other apps - whether mine or from other developers. The authorization dialog shows up for those apps as expected.


Any ideas what's going on and how to solve it?

Any help will be appreciated!

macOS 10.14.5
iMac 2017 27"


Thanks,
Leo


Filed under: sandbox, authorization

Offline

 

#2 2019-06-04 05:49:58 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5894

Re: Apple Event authorization dialog never shows up

zevrix wrote:

I'm developing in Xcode



Did you add a Privacy - AppleEvents Sending Usage Description string to the Info settings?


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#3 2019-06-04 06:52:29 pm

zevrix
Member
Registered: 2012-08-01
Posts: 20

Re: Apple Event authorization dialog never shows up

Shane Stanley wrote:
zevrix wrote:

I'm developing in Xcode



Did you add a Privacy - AppleEvents Sending Usage Description string to the Info settings?



Thanks Shane,

Yep NSAppleEventsUsageDescription is there...

Offline

 

#4 2019-06-07 02:28:41 am

zevrix
Member
Registered: 2012-08-01
Posts: 20

Re: Apple Event authorization dialog never shows up

Ok I finally found what caused the issue:

It was the "Automatically manage signing" option in Xcode.

Once I disabled it - as it always was - the Apple event authorization dialogs came back.


I enabled automatic signing in that one app in order to start testing the notarization process.

Eventually the app was notarized. There were no errors during signing or at any other point of the process. And yet it lead to suppression of the authorization dialogs.

Which means to me that there's a severe bug in this whole signing-notarizing-appleeventsandboxing-whatever mumbo-jumbo:

If the signing-notarization process went successfully without any errors, then it shouldn't disable AE authorization dialogs - thus quietly rendering the app useless.

And if this process does disable the AE authorization machinery for whatever reason - then Xcode should clearly notify the developer about it.


Just in case: I've been signing my apps, of course, for years ever since this was required. I'm just doing it with my custom script droplet - because the automatic signing option in Xcode never produced satisfactory results (for reasons I don't recall by now).

I guess I'll try then to perform notarization via a script too - and see if it solves the problem...

Offline

 

#5 2019-06-07 06:04:06 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5894

Re: Apple Event authorization dialog never shows up

Don't click the automatic signing option -- it's really meant for people writing for the App Store. And you need to enable Apple events in the Hardened Runtime settings (under Capabilities).


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

#6 2019-06-07 11:07:18 pm

zevrix
Member
Registered: 2012-08-01
Posts: 20

Re: Apple Event authorization dialog never shows up

YES! Enabling AppleEvents in Hardened Runtime solved the issue.

Shane, thanks a lot for your help!

I can now continue to create notarization process for my apps.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)