2 Replies
      Latest reply: Jan 10, 2017 3:10 AM by roee84 RSS
      roee84 Level 1 Level 1 (0 points)

        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?

        • Re: PacketTunnelProvider wifi or ethernet
          eskimo Apple Staff Apple Staff (6,765 points)

          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"

            • Re: PacketTunnelProvider wifi or ethernet
              roee84 Level 1 Level 1 (0 points)

              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