I am having problems connecting to my endpoint system extension from another app.
The ES's main app (the front-end GUI) connects fine to the endpoint extension and they communicate fine. I am using the mach service name of
<TeamID>.<system extension BundleID>.xpc
However, when trying to connect from another GUI app using the same code and trying to use the same mach service name, the connect fails with error
"Couldn’t communicate with a helper application."
Anyone know the magic incantation I need to add to get this working?
Thanks,
Apparently (?) even an independent application needs to have the sandbox removed to connect to the EndpointSecurity extension.
The App Sandbox prevents the app from connecting to arbitrary system-wide Mach services. Such a connection must be explicitly whitelisted. This happens automatically for built-in services but not for third-party services.
Is there an exception I can add to the App Sandbox to allow it to connect to the ES extension?
That’d be Global Mach Service temporary exception (
com.apple.security.temporary-exception.mach-lookup.global-name
).
Note Despite the “temporary” in the name, it’s fine to use this in a Developer ID app. If you want this app to ship via the Mac App Store, things get trickier. App Review generally takes a dim view of folks reaching outside of their sandbox.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"