Class

NEVPNManager

An object to create and manage a Personal VPN configuration.

Declaration

@interface NEVPNManager : NSObject

Overview

Personal VPN

The NEVPNManager API gives apps the ability to create and manage a Personal VPN configuration on iOS and macOS. Personal VPN configurations are typically used to provide a service to users that protects their Internet browsing activity on insecure networks such as public Wi-Fi networks.

Topics

Managing VPN Configurations

+ sharedManager

Access the single instance of NEVPNManager.

- loadFromPreferencesWithCompletionHandler:

Load the VPN configuration from the Network Extension preferences.

- saveToPreferencesWithCompletionHandler:

Save the VPN configuration in the Network Extension preferences.

- removeFromPreferencesWithCompletionHandler:

Remove the VPN configuration from the Network Extension preferences.

Accessing VPN Configuration Properties

enabled

A Boolean used to toggle the enabled state of the VPN configuration.

protocolConfiguration

An NEVPNProtocol object containing the configuration settings of the VPN tunneling protocol.

protocol

An NEVPNProtocol object containing the configuration settings of the VPN tunneling protocol.

Deprecated
localizedDescription

A string containing the display name of the VPN configuration.

onDemandEnabled

A Boolean used to toggle the Connect On Demand capability.

onDemandRules

An ordered list of Connect On Demand rules

Connecting and Disconnecting VPN

connection

An NEVPNConnection object that is used to control the VPN tunnel specified by the VPN configuration.

Notifications

NEVPNConfigurationChangeNotification

Posted after the VPN configuration stored in the Network Extension preferences changes.

Entitlements

Personal VPN Entitlement

The API an app can use to create and control a custom system VPN configuration.

Key: com.apple.developer.networking.vpn.api

Relationships

Inherits From

See Also

VPN Configuration

NETunnelProviderManager

An object to create and manage the tunnel provider’s VPN configuration.

NETunnelProviderProtocol

Configuration parameters for a VPN tunnel.

NEAppRule

The identity of an app whose traffic is to be routed through the tunnel.