所以我只是在我的一个产品中添加了沙盒。除了工作流程中的最后一步是设置桌面之外,它完全可以使用。它通过 NSWorkspace 做到这一点。当我打电话
[[NSWorkspace sharedWorkspace] setDesktopImageURL:[NSURL fileURLWithPath:imagePath]
forScreen:screen
options:nil
error:&error];
我收到以下错误:
*** attempt to post distributed notification 'com.apple.desktop' thwarted by sandboxing.
对,所以我需要一个像这样的临时异常:
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>XXXXX</string>
</array>
所以最终我需要弄清楚 XXXXX 中的内容,对吗?什么处理桌面设置?而且,更一般地说,是否有一种简单的方法来确定消息的目标包?