Instance Method

startVPNTunnel()

Start the process of connecting the VPN

Declaration

func startVPNTunnel() throws

Parameters

error

A pointer to a pointer to an NSError object. If specified and the VPN connection process cannot be started due to an error, this parameter will be set to point to an NSError object containing details about the error. See NEVPNManager for a list of possible errors.

Return Value

true if the process of connecting the VPN started successfully, false if an error occurred.

Discussion

This method returns immediately after starting the process of connecting the VPN. In order to be notified when the VPN is fully connected, register to observe the NEVPNStatusDidChange notification on the NEVPNConnection object, and examine the status property when the notification is received.

See Also

Controlling the VPN Connection