Closed andreasley closed 4 months ago
I've realized that simply creating a named Mach service is possible, so I'm doing just that:
try XPCServer.forMachService(withCriteria: .init(machServiceName: "com.somecompany.someapp.someservice", clientRequirement: .sameTeamIdentifier))
Thanks for this great library!
I'm trying to communicate with a bundled Mach service that is installed using
SMAppService
. Both the main .app and the Mach service are sandboxed.Here's how I configure the
XPCServer
in the Mach service:Unfortunately, this fails. The function
validateThisProcessIsAnSMAppServiceDaemon()
returns a.failure
because the Sandbox prevents it from readingLibrary/LaunchDaemons/
in the main app's bundle.Logged messages:
I'd like keep the service sandboxed (XPC worked fine when using Apple's
XPCSession
).Failed attempts:
I've tried to find a Sandbox exception entitlement that allows reading a bundle-relative path. There doesn't seem to be one.
Is there perhaps another solution or did I miss anything?