raymondchans
raymondchans

Reputation: 11

Control other app in my app(in sandbox)

I want to miniaturize the Finder in my app, so I use ScriptingBridge to control the Finder. But, when my app is in the sandbox, it fails to run.

I added com.apple.security.scripting-targets in the sandbox entitlements. Here is the code

<key>com.apple.security.scripting-targets</key>
    <key>com.apple.finder</key>
    <array>
        <string>com.apple.finder.compose</string>
    </array>

Upvotes: 1

Views: 413

Answers (1)

mahal tertin
mahal tertin

Reputation: 3416

Finder does not have any scripting access groups. You could add the temporary exception com.apple.security.temporary-exception.apple-events as documented here.

To find scripting targets see here: How can I know the Apple Event Access Groups used by an application?

If you'd like to distribute your app in App Store, however, you're out of luck. By scripting Finder, your app will not pass the review into the App Store.

Upvotes: 1

Related Questions