I have a similar problem and I have now discovered in the release notes for macOS 14.2 that:
Fixed: Requirements for agents and daemons registered with SMAppService have changed to prevent sandbox escapes. The target executable must be sandboxed if the main app is sandboxed. A small sandboxed trampoline tool can be written to execute scripts and unsandboxed or system tools. (113037504)
I had somehow missed this information but I guess that it is now (as of macOS 14.2) clear that the system needs a SMAppService tool that is in a sandboxed app, to also be sandboxed. Although I can't find any updated documentation for it.
For me this causes a problem as my helper daemon unfortunately needs to be unsandboxed (to run certain things) but my main app is sandboxed (even though it is not for Mac App Store). I guess that I could remove the sandbox from the main app but before I do that I would like to know what a:
small sandboxed trampoline tool
really is and how one could implement something like that? Is it a small XPC service that is sandboxed and can it then talk to an unsandboxed tool? Or is it something else?
/Peter
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: