I have an iOS app with working network extension for VPN based on `NEPacketTunnelProvider`.
I need to fix some issues in it's behaviour and I can not understand how does system work with extension. Time-to-time I need to check some internal settings of the app to allow or deny connection via VPN.
Documentation says:
Instance Method
startTunnel(options:completionHandler:)
Start the network tunnel.
This method is called by the system to start the network tunnel.
Settings of my VPN turn on on-demand option for it and I have a question: how does often system call this method? Once per session? Often? Is this method called during switching from WiFi to Cellular, or when device returns from Airplane mode?