Instance Method


Start the process of connecting the tunnel.


- (BOOL)startTunnelWithOptions:(NSDictionary<NSString *,id> *)options andReturnError:(NSError * _Nullable *)error;



A dictionary containing options to be passed to the Tunnel Provider extension.


A pointer to a pointer to an NSError object. If specified and the tunnel 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.


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

See Also

Controlling the Tunnel Connection

- stopTunnel

Start the process of disconnecting the tunnel.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software