Commit graph

3 commits

Author SHA1 Message Date
Daniel Le
221857e236 Fix "Launch Flycut on login" on older builds without SANDBOXING defined
For these builds, Apple Events sent to "System Events.App" will fail
with -600 error codes unless these additional entitlements are granted:

  <!-- Required for builds without SANDBOXING defined. -->
  <key>com.apple.security.automation.apple-events</key>
  <true/>

  <!-- Required for sandboxed builds without SANDBOXING defined. -->
  <key>com.apple.security.temporary-exception.apple-events</key>
  <string>com.apple.systemevents</string>

(Of course, Apple might not grant these permissions for versions
submitted to the App Store.)

This is because Apple introduced more privacy measures in Mojave that
prohibit sandboxed apps from sending Apple events to other apps without
either a scripting-targets entitlement or an apple-events temporary exception entitlement.
However, "System Events.app" doesn't have any scripting entitlements
that we could use. Hence, we must use the latter.

"However, with App Sandbox you cannot send Apple events to other apps
unless you configure a scripting-targets entitlement or an apple-events
temporary exception entitlement."
https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/AppSandboxTemporaryExceptionEntitlements.html

The below post also documented the issue and solution in more details:
https://www.jessesquires.com/blog/2018/11/17/executing-applescript-in-mac-app-on-macos-mojave/
2022-02-13 03:54:03 +08:00
Mark Jerde
953d0d837d Add ability to select save locations
Tighten up app-sandbox support.
2022-01-23 21:47:21 -06:00
Gennadii Potapov
149f969e3f Project cleanup 2020-01-21 15:34:19 +08:00