AndreasRoth

17.0v3 RUNTIME, NO APPLE EVENT HANDLING UNDER MOJAVE

Discussion created by AndreasRoth on Dec 12, 2018
Latest reply on Jan 17, 2019 by codecruncher

APPLE EVENT HANDLING DOES NOT WORK WITH FMP 17.0v3 RUNTIME UNDER MOJAVE

 

There is a major problem with FMP 17.0v3 runtimes under macOS Mojave 10.14:

 

FMP 17 runtimes (signed and notarized) do not respond to the new automation security handling of Apple events in macOS Mojave. Therefore a runtime solutions can not use AppleEvents anymore. Features like calling Mail (creating a mail out of your solution) or AppleScript calls or any call to another App DO NOT work with macOS Mojave any more!

 

Usually when an app attempts to send an Apple event to another app on Mojave, the system displays an authorization alert to the user. The general form of his alert is:

 

    “[YourAppName]“ wants access to control “[YourTargetApp]“. Allowing

    control will provide access to documents and data in

    “[YourTargetApp]“, and to perform actions within that app.

 

    [A user-visible string, provided by your app, that explains what it

    does with Apple events.]

 

                                            [Don’t Allow] [OK]

 

If the user clicks OK, the Apple event goes through. If they click Don’t Allow, it fails. The decision is recorded and that record is displayed in System Preferences > Security & Privacy > Automation.

 

SYMPTOMS

 

Apple events always fail with a FMP 17.0v3 runtime on Mojave, no authorization alert is displayed to the user and no record is displayed and stored in System Preferences > Security & Privacy > Automation. Sending an Apple event to another app DOES NOT WORK.

 

APPLES TECHNICAL SUPPORT ANSWER

 

Apples technical support sent the following information:

 

"The wrinkle here relates to Xcode. If your app was built with Xcode 10 or later (that is, the 10.14 SDK or later) you must provide the NSAppleEventsUsageDescription string. If you don’t, the Apple event will always fail, without displaying the authorization alert to the user. I suspect that’s what you're seeing."

 

DOES ANYONE HAVE AN IDEA HOW TO SOLVE THIS?

 

What does it mean, to provide the "NSAppleEventsUsageDescription" string. We have added it to the info.plist, but it still does not work. Maybe it must be preset at Xcode compile time?

Outcomes