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
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"