2 Replies
      Latest reply: Nov 23, 2016 8:54 AM by bwalle RSS
      bwalle Level 1 Level 1 (0 points)

        Hello, I've studied the API documentation of the NetworkExtension framework, but I didn't find the answer. Maybe somewhere here can help me: Whenever I call the method - (void)cancelTunnelWithError:(NSError *)error NEPacketTunnelProvider, where can I access that NSError object in the App? Because the tunnel provider is terminated, so I can't use an IPC message to ask the VPN extension about the error cause. I just want to display an error message to the user and the idea was to get the cause from that error object. Regards, Bernhard

        • Re: VPN Disconnect error
          eskimo Apple Staff Apple Staff (6,310 points)

          Last I checked there’s no good way to get detailed ‘why did I disconnect’ information from a VPN connection.  For a provider-based VPN you could write the error information to disk in an App Group that you share between your provider and your app; that’s super ugly, but it’ll work.

          Please do file an enhancement request requesting better support for this, then post your bug number, just for the record.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"