沙盒时无法终止其他应用程序

Unable to terminate other apps when sandbox

我开发了一个终止其他应用程序的应用程序,它在没有沙盒的情况下工作得很好。

NSWorkspace.shared.runningApplication.forceTerminate()

问题: 当应用程序是沙盒时,我无法终止其他应用程序。

问题: 如何允许我的应用程序在沙盒时具有终止其他应用程序的能力?

When the app is sandbox I cannot terminate other apps.

正确。这就是沙箱的本质:您的应用程序与其他应用程序隔离,并且不能在某些特定通道之外与它们交互。

How can allow my app to have the capability to terminate other apps when sandbox?

你不能。 (至少,一般情况下不会。)