Flycut/Info.plist
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

40 lines
1.4 KiB
Text
Executable file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>flycut.icns</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSAppleEventsUsageDescription</key>
<string>Flycut needs this permission to be able to paste text into other applications, and add itself to Login Items to be launched on login.</string>
<key>NSHumanReadableCopyright</key>
<string>(c) General Arcade, 2011-2020</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
</dict>
</plist>