Our application tries to read the title of the browser, which is then used by the application to carry on further operations. For this purpose application invokes an AppleScript "tell application <browser> to return name of front document".
Mojave added a requirement to include a new NSAppleEventsUsageDescription key in the info.plist file when the application tries to invoke an AppleScript.
But on Catalina, even with the key set in the application's info.plist file, the application is still unable to invoke the AppleScript with the error "-1743 Not authorized to send Apple events to <applicationName>".
Looking at the release notes for the latest Catalina build
"To enhance security, AppleEvents and AppleScripts that target an app on a remote system must authenticate as the same user on the remote system. An AppleEvent that targets an app running as a different user receives a procNotFound error. To allow remote AppleEvents to target apps in any user session, run the following command in Terminal on the server:
defaults write /Library/Preferences/com.apple.AEServer RestrictAccessToUserSession -bool false Then disable and reenable Remote Apple Events in System Preferences > Sharing. (5353592)"
This seems to be the only change documented for AppleScripts. Our application is not trying to run on the remote systems but runs locally. Does the above change apply to all scripts whether they running locally or remotely? Can anyone suggest what can we do to get the AppleScript working?