PacketTunnelProvider wifi or ethernet

I've implemented VPN apps both for iOS and MacOS.


For iOS Im using an observer (for key defaultPath) to detect network changes between 3G and wifi to disconnect the tunnel and open a new one when the connectivity changes


for OSX I want to do the same thing and detect changes between wifi and ethernet

Using reachability doesnt seems like a good solution

So how can I do it?

Replies

for OSX I want to do the same thing and detect changes between wifi and ethernet … So how can I do it?

I would expect you to use the same strategy as you use on iOS. Does that not work?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Sorry for the delay - just now I noticed your response.

For iOS, the observer is to detect the changes between 3G to Wifi, and it's done via the isExpensive property

For MacOS, I need to detect changes between WIFI and ethernet, and for both cases isExpensive = false.

So I need a different strategy to do it