I want/need/would like the Network Extension to send a XPC message to a XPC listener of a launchd daemon.
So far, what I'm observing is:
This is a bit mysterious considering that the pid for the listener is not 0 (i.e. the kernel_task).
Questions:
I would rather not have to send a XPC message from the launchd daemon to the NE as this would mean that the launchd daemon would need to be launched at startup. Also this would not make a lot of sense from an architectural point of view since it's the launchd daemon that is supposed to be a service for the network extensions and no the opposite.
So far, what I'm observing is:
the NE is apparently able to obtain a remote proxy object for the XPC service name defined by the launchd daemon.
when the proxy invokes one of the methods of the remote interface, it does nothing:
the completion handler of the method is not called in the Network Extension.
the proxy error handler is not called either.
Code Block com.xxxxxxxxx.extension Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.xxxxxxx.logListener was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.xxxxxxx.logListener was invalidated.}
This is a bit mysterious considering that the pid for the listener is not 0 (i.e. the kernel_task).
Questions:
Is it possible to send XPC messages from a Network Extension to a launchd daemon?
Maybe this requires to use some specific service names too or specific bundle identifier for the launchd daemon. Which ones?
I would rather not have to send a XPC message from the launchd daemon to the NE as this would mean that the launchd daemon would need to be launched at startup. Also this would not make a lot of sense from an architectural point of view since it's the launchd daemon that is supposed to be a service for the network extensions and no the opposite.