Guys, I’ve made simple automation which triggers VPN when you open the app and disconnects VPN after you leave the app. It works fine except the situation when I turn off iPhone screen having the app still open. After I turn on my iPhone again I’m still in the app but VPN is disconnected. I need to exit to homescreen, wait a bit and switch back to the app. Then VPN enables again.
Is there some workaround to keep VPN enabled after turning on the screen?
There are a number of reasons it might disconnect. The first thing to check with your VPN provider under what circumstances they might drop or explicitly terminate/time out a connection.
OK, maybe I’ll rephrase my question then.
Is there a way to reconnect VPN upon powering on the iPhone again? Like check if I’m in the app which needs VPN connection.
Ahh yes you’re right. I’ve always gotten into a habit of going to homescreen before my device locks / sleeps. But I can see where the issue would be for you. You could use a NFC automation to force your device to go to homescreen whenever it is unlocked. This can be achieved by putting NFC tag in your case
Thanks. I’ve removed automation which disables VPN. So, now after 1st run of the app I have VPN connected. And I turn it off manually by shortcut on homescreen. Not so convenient but solves my issue with turning off VPN while pressing power button.