Apple 的 SMJobBless() 在沙箱下不起作用

Apple's SMJobBless() doesn't work under sandbox

Apple 的 SMJobBless 应该是编写在沙箱中运行并需要特权的程序的新的、正确的方法。但是,当我下载代码并打开沙盒时,它不起作用。相反,我收到此错误:

2015-09-27 15:10:30.820 SMJobBlessApp[78676:4426508] ApplePersistence=NO
2015-09-27 15:10:31.273 SMJobBlessApp[78676:4426508] Something went wrong! NSOSStatusErrorDomain / -60005

我需要从在沙盒中运行的应用程序写入 /etc 中的文件。这可能吗?

我认为你"Apple's SMJobBless is supposed to be the new, correct way to write a program that runs in the sandbox and requires privileges"的开头句不正确。

当我查看 Apple 的 App Sandbox 设计指南的 "Determine Whether Your App Is Suitable for Sandboxing" 部分时,您似乎无法使用授权服务来提升权限。

如果您在沙盒中,you really can't access the "/etc" directory