Hello,
I'm developing an application with NEAppProxyProvider.
Everything works flawlessly. I see my VPN network interface in the System Preferences -> Network list and it successfully goes to state Connected.
But there is a problem when there is no active network, e.g. user's wifi or LAN connection is disconnected. Then my VPN does not launch/connect. Yes, the user can than manually connect the VPN from the System Preferences -> Network when he connects to a network. But i'd like launch/connect the VPN automatically if there is any active network. Because the user might be traveling with his MacBook between different wifi ACs, or there might be a network outage, etc. And I don't want to annoy the user with the need of manual launch/connect of the VPN.
Is there any way to set a callback when an active network becomes available? It would largely increase user experience of my application.
I'm developing an application with NEAppProxyProvider.
Everything works flawlessly. I see my VPN network interface in the System Preferences -> Network list and it successfully goes to state Connected.
But there is a problem when there is no active network, e.g. user's wifi or LAN connection is disconnected. Then my VPN does not launch/connect. Yes, the user can than manually connect the VPN from the System Preferences -> Network when he connects to a network. But i'd like launch/connect the VPN automatically if there is any active network. Because the user might be traveling with his MacBook between different wifi ACs, or there might be a network outage, etc. And I don't want to annoy the user with the need of manual launch/connect of the VPN.
Is there any way to set a callback when an active network becomes available? It would largely increase user experience of my application.