Is there a way for my macos app to run NSRunningApplication.terminate()?

When my macOS app (currently in TestFlight and set for Mac App Store distribution) tries to terminate another app, both terminate() and forceTerminate() consistently return false. However, I can retrieve a list of all running applications so some related APIs do work.

I suspect this limitation is due to sandboxing. I have three questions:

  1. Is there any permission or entitlement I can add in Xcode to allow my app to terminate other applications?
  2. If no such permission exists, is there a way to guide users on how to launch my app (distributed through the Mac App Store) without sandboxing? For example, could they set it up to launch as a daemon or agent?
  3. If unsandboxing is impossible, would I need to create a separate target specifically without sandboxing? In other words, my MacOS app would communicate with my unsandboxed daemon that would do all the terminate()-ing?
Is there a way for my macos app to run NSRunningApplication.terminate()?
 
 
Q