I am working on the MAC Application in which I have to create the VPN Connection which I have Done Successfully.
Now I want to know the Reason If My VPN Disconnect.
When the VPN Disconnect I get the callback in my application and there I called the below code : SCNetworkConnectionCopyExtendedStatus
dicVPNFailureData =(__bridge NSDictionary *)(SCNetworkConnectionCopyExtendedStatus(connection));
Now this return me Dictionary as Below
{
PPP = {
DeviceLastCause = 0;
LastCause = 10;
Status = 0;
};
Status = 0;
}
In this Dictionary, I receive the Disconnection cause in LastCause Key.
Now I want the message on the basis of that Code.
I also try the below code to get the Message but does not return message related to VPN Disconnection.
errorMessage = SCErrorString(strCode.intValue);
Is there any other way I can get the Error Message when my VPN Connection Disconnected.
Thanks for the help.