With XPC, yes. See Validating Signature Of XPC Process.
Ok perfect, this is exactly what I was looking for. Thanks!
If so, that’s fine. In this layout, A is the main executable for A.app and B is a ‘helper tool’. The location it’s in, Contents/MacOS, is one of the standard locations appropriate for helper tools, per the advice in Placing Content in a Bundle.
The only reason you might need to be B into a bundle is if it needs a restricted entitlement. See Signing a daemon with a restricted entitlement.
Spot on. I actually have services A, B and C (I omitted info about C because it wasn't extremely relevant, but I'll bring it up here to relate it to what you're saying). C does have a restricted entitlement (endpoint security), so I placed it into an app bundle under Contents/Frameworks. Sounds like I can move it under Contents/MacOS, and have A, B, and C all under there (with C being a bundle). Also sounds like it won't really make a difference at all if I don't (unsure if it being under Frameworks has any unforseen consequences but sounds like it would not, other than just being incorrectly classified in app bundle ontology).
That’s not going to work. To listen on a named XPC endpoint, you must be started by launchd with a configuration that includes that endpoint name. I talk about this in a lot more detail in XPC and App-to-App Communication.
Yeah this makes sense. I had briefly thought to do this, but wasn't sure if there was a different way that may be easier.
Have your development daemon launch on demand. This is the default, but my experience is that lots of folks disable launch on demand by setting RunAtLoad or via the KeepAlive property.
Ah perfect, yeah I have RunOnLoad set in the launchd config (doh). This makes sense. I think i'll try to use this approach over SMJobSubmit as it's a bit less effort to maintain config for our local development environment than an entirely new branch of code.
Yep. My go-to tool for that is LOCAL_PEERTOKEN (see this thread) but it’s not as secure as XPC. Specifically, it tells you who created the socket, not who sent the message, and it’s the latter that really matters.
Yeah I'll stick with XPC. I have it working (other than getting signing authN up).
Thank you!
D