我开发了一个可以终止其他应用程序的应用程序,当它没有沙箱时它可以完美地工作。
NSWorkspace.shared.runningApplication.forceTerminate()
问题: 当应用程序是沙箱时,我无法终止其他应用程序。
问题: 如何让我的应用程序能够在沙箱中终止其他应用程序?
最佳答案
When the app is sandbox I cannot terminate other apps.
正确。这就是沙箱的本质:您的应用程序与其他应用程序隔离,并且无法在某些特定 channel 之外与其他应用程序进行交互。
How can allow my app to have the capability to terminate other apps when sandbox?
你不能。 (至少在一般情况下不是。)
关于swift - 沙盒时无法终止其他应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49702866/