gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 17:11:24 25 4
gpt4 key购买 nike

我想在我的应用程序中小型化 Finder,因此我使用 ScriptingBridge 来控制 Finder。但是,当我的应用程序位于沙箱中时,它无法运行。

我在沙箱权利中添加了 com.apple.security.scripting-targets。这是代码

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

最佳答案

Finder 没有任何脚本访问组。您可以添加临时异常 com.apple.security.temporary-exception.apple-events as documented here

要查找脚本目标,请参阅此处:How can I know the Apple Event Access Groups used by an application?

但是,如果您想在 App Store 中分发您的应用程序,那么您就不走运了。通过编写 Finder 脚本,您的应用将不会通过 App Store 的审核。

关于macos - 控制我的应用程序中的其他应用程序(在沙箱中),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25225371/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com