Mojave vs. AppleScript
Mojave vs. AppleScript
- Subject: Mojave vs. AppleScript
- From: "Michal L. Wright" <email@hidden>
- Date: Tue, 30 Oct 2018 16:25:23 -0700
My Mac database app includes a “Grab Web Address” function that uses
AppleScript to get the URL and window name of the current tab from a variety of
browsers. The URL and name are then pasted into a newly created record.
It worked with Demeter, Google Chrome, iCab, OmniWeb, Opera, Safari, Vivaldi,
and Yandex. The appropriate scripts are generated on the fly, to work with the
frontmost open browser.
The app uses Developer ID distribution, and is not sandboxed.
This function no longer functions under Mojave.
The Mojave 10.14 release notes web page
<https://developer.apple.com/documentation/macos_release_notes/macos_mojave_10_14_release_notes>
says:
Sending Apple events from an app—including script applets—now requires user
approval. The list of currently approved apps can be viewed and edited in the
Automation category in the Privacy tab in System Preferences > Security &
Privacy. If an event is blocked because the user didn’t approve that app, the
event will fail with the error code: -1743 ("<sender>: Not authorized to send
Apple events to <target>"). An event can be preflighted using
AEDeterminePermissionToAutomateTarget(_:_:_:_:)
<https://developer.apple.com/documentation/coreservices/3025784-aedeterminepermissiontoautomatet>.
The developer documentation of AEDeterminePermissionToAutomateTarget provides
no overview.
I’ve done some searching and found some discussions, and tried some ideas. I
added a Privacy - AppleEvents Sending Usage Description item to my info.plist.
AEDeterminePermissionToAutomateTarget produces an errAEEventNotPermitted.
Then I call [getURLscript executeAndReturnError:&URLerrorInfo], I get the
following runtime error:
iData Pro[18598:682248] skipped scripting addition
"/Library/ScriptingAdditions/Adobe Unit Types.osax" because it is not
SIP-protected.
I was hoping to find more on line, but haven’t spotted anything useful.
Any ideas?
Thanks,
Mike Wright
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden