I've implemented a VPN app with Packet Tunnel Provider for MacOS and iOS.
I have two questions regarding the Extension's sleep/wake functions:
1. If the VPN configuration is set with disconnectOnSleep = false, and at the extension I'm sending keep-alives every X seconds,
What would happen when the device enters sleep mode? Will it keep sending keep-alive (because the VPN is configured with disconnectOnSleep=false) ?
2. If the VPN configuration is set with disconnectOnSleep = true, and also isOnDemandEnabled = true.
When the device enters sleep mode, do I need to disconnect the VPN myself? Or the OS would take care of it?
And if I should disconnect it myself, the on-demand won't try to turn it on again (because the on-demand) ?