The documentation for the interruptionHandler
block of NSXPCConnection
states:
An interruption handler that is called if the remote process exits or crashes.
However, the Daemons and Services Programming Guide states:
XPC services are managed by launchd, which launches them on demand, restarts them if they crash, and terminates them (by sending SIGKILL) when they are idle. This is transparent to the application using the service, except for the case of a service that crashes while processing a message that requires a response. In that case, the application can see that its XPC connection has become invalid until the service is restarted by launchd
If an XPC process is killed for being idle, will I get a callback in my interruptionHandler
? Or will I only get the callback when the app crashes while processing a message? I ask because this test case seems like it's impossible to simulate. XPC service lifecycle is unfortunately a very black box.