简体   繁体   English

控制我的应用程序中的其他应用程序(在沙箱中)

[英]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. 我想使我的应用程序中的Finder小型化,所以我使用ScriptingBridge控制Finder。 But, when my app is in the sandbox, it fails to run. 但是,当我的应用程序位于沙箱中时,它无法运行。

I added com.apple.security.scripting-targets in the sandbox entitlements. 我在沙盒权利中添加了com.apple.security.scripting-targets。 Here is the code 这是代码

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

Finder does not have any scripting access groups. Finder没有任何脚本访问组。 You could add the temporary exception com.apple.security.temporary-exception.apple-events as documented here . 您可以添加临时异常com.apple.security.temporary-exception.apple-events ,如此处所述

To find scripting targets see here: How can I know the Apple Event Access Groups used by an application? 要查找脚本目标,请参见此处: 我如何知道应用程序使用的Apple事件访问组?

If you'd like to distribute your app in App Store, however, you're out of luck. 但是,如果您想在App Store中分发您的应用程序,那您就不走运了。 By scripting Finder, your app will not pass the review into the App Store. 通过使用Finder脚本编写脚本,您的应用不会将评论传递到App Store。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM