Hello.
I'm working on iOS application, which establishes a VPN connection.
I have following code:
What I do:
I'm working on iOS application, which establishes a VPN connection.
I have following code:
Code Block let connectRule = NEOnDemandRuleConnect() connectRule.interfaceTypeMatch = .any connectRule.probeURL = URL(string: "https://www.google. com")
What I do:
Added VPN profile to iPhone's settings
Successfully connected to VPN
iPhone goes to sleep
Disable my VPN server
VPN server is disabled, so VPN connection goes off
But network on iPhone is reachable (cellular of wifi) and probeUrl is reachable, so VPN tries to connect
VPN connection fails to connect (because of VPN server is disabled) and we are going to step 1