How to get more details regarding IPSec VPN authentication error codes using NEVPNManager

Hello,


We are implementing the IPSec VPN using the NEVPNManager API. Basically we are using the built in IPSec engine. We are trying to capture any errors that might happen during the connection setup. We are using – startVPNTunnelAndReturnError which would give us the information regarding the following errors:


NEVPNErrorConfigurationInvalid

NEVPNErrorConfigurationDisabled

NEVPNErrorConnectionFailed

NEVPNErrorConfigurationReadWriteFailed

NEVPNErrorConfigurationStale

NEVPNErrorConfigurationUnknown


We would like to know if

NEVPNErrorConnectionFailed
would give us any further information about authentication errors or the exact error codes returned by the VPN server? We would need this information for some of our reporting details as well as to display the messages to the end user as to why the connection has failed.


Thank you,

Shalini.

Replies

AFAIK there’s no API to get this level of detail about connection errors. I can understand why your app might want to gather such info. I recommend you file an enhancement request explaining the features you’d like t see and why you’d like to see them. Please post your bug number, just for the record.

In the meantime, if you’re having users with specific problems you can get diagnostic information from them using the techniques described on the Profiles and Logs page. A vanilla sysdiagnose will contain some useful info but if that’s not sufficient you can have the user follow the VPN (Network Extension) instructions for their platform.

Share and Enjoy

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

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

Good morning,


Thank you very much for the response. As per the suggestion I have opened an enhance ment request and the issue number is 29157906.


Thank you,

Shalini.

Was this issue resolved? A customer is reporting NEVPNErrorConfigurationDisabled upon startVPNTunnelWithOptions, however we can not reproduce this ourselves. We know our NEVPNManager has setEnabled:true called.