The command line tool sends an Apple Event to the app but this works only if the CLT entitlements contains
Code Block <key>com.apple.security.temporary-exception.apple-events</key> <array> <string>com.my-app-bundle-id</string> </array>
The CLT and bundle ids are identical, the team id is identical, too
I can't find where the error is hidden, may you help me?
The app is distributed via the Mac App Store
I show below the plist and entitlements
App entitlement
Code Block <?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>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.application-groups</key> <array> <string>$(TeamIdentifierPrefix)com.appgroup.myapp</string> </array> <key>com.apple.security.files.bookmarks.app-scope</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.network.client</key> <true/> </dict> </plist>
App plist
Code Block <?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>CFBundleDisplayName</key> <string>myapp</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>myext</string> </array> <key>CFBundleTypeIconFile</key> <string>my</string> <key>CFBundleTypeMIMETypes</key> <array> <string>application/octet-stream</string> </array> <key>CFBundleTypeName</key> <string>myapp</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSTypeIsPackage</key> <false/> <key>LSHandlerRank</key> <string>Owner</string> <key>NSDocumentClass</key> <string>VDDocument</string> <key>NSPersistentStoreTypeKey</key> <string>Binary</string> </dict> </array> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleHelpBookFolder</key> <string>myappHelp</string> <key>CFBundleHelpBookName</key> <string>com.myapp.help</string> <key>CFBundleIconFile</key> <string>my.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>1.1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.1.0</string> <key>LSApplicationCategoryType</key> <string>public.app-category.utilities</string> <key>LSMinimumSystemVersion</key> <string>${MACOSX_DEPLOYMENT_TARGET}</string> <key>NSHumanReadableCopyright</key> <string>2010, myapp.com</string> <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> </dict> </plist>
Command line tool plist
Code Block <?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>CFBundleIdentifier</key> <string>com.myapp.myclt</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>codesign</string> <key>CFBundleVersion</key> <string>1.2</string> <key>NSAppleEventsUsageDescription</key> <string>Please give my command line tool access to my app</string> </dict> </plist>
Command line tool entitlement
Code Block <?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>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.application-groups</key> <array> <string>$(TeamIdentifierPrefix)com.appgroup.myapp</string> </array> <key>com.apple.security.automation.apple-events</key> <true/> <key>com.apple.security.temporary-exception.apple-events</key> <array> <string>com.myapp</string> </array> </dict> </plist>