How to catch error of system extension during running?

I have tried to implement Network Extension. Unfortunately, NE was throw some errors and restart, that make my IPCConnection was interrupted. \

I want to reconnect IPCConnection when NE was interrupted!

I want to reconnect IPCConnection when NE was interrupted!

To do this you'll want to make sure that your NSXPCListener is also started on the start/restart of the Network System Extension so that when the client needs to make a connection, there is a listener available to accept it. Take a look at Simple Firewall sample, this is done in the main.swift file when the extension is started.

How to catch error of system extension during running?
 
 
Q