I'm building a simple VPN app. I got networking entitlements, and I created the app extension. I've configured the VPN to be "on demand" and active while sleeping.
My question is - What happens when the app is in background mode ? Should I add more app capabilities, or is it enough ?
(And a following question - while in a background mode, the app extension functions like startTunnelWithOptions(...) are still getting called, Am I right? )
The application which starts the Packet Tunnel Provider is called as container app. Here your application is the container app. The container app and packet tunnel provider runs in separate process. Container app and the Packet Tunnel provider process communicate through IPC. Even when your application goes background your packet tunnel provider keeps running and handle your application according to packet tunnel provider(VPNManager) status when moving from background to foreground. You need not add any other capabilities.