<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEVPNManager",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEVPNManager"
  },
  "title" : "NEVPNManager"
}
-->

# NEVPNManager

An object to create and manage a Personal VPN configuration.

```
class NEVPNManager
```

## Overview

The [`NEVPNManager`](/documentation/NetworkExtension/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

[`shared()`](/documentation/NetworkExtension/NEVPNManager/shared())

Access the single instance of `NEVPNManager`.

[`loadFromPreferences(completionHandler:)`](/documentation/NetworkExtension/NEVPNManager/loadFromPreferences(completionHandler:))

Load the VPN configuration from the Network Extension preferences.

[`saveToPreferences(completionHandler:)`](/documentation/NetworkExtension/NEVPNManager/saveToPreferences(completionHandler:))

Save the VPN configuration in the Network Extension preferences.

[`setAuthorization(_:)`](/documentation/NetworkExtension/NEVPNManager/setAuthorization(_:))

[`removeFromPreferences(completionHandler:)`](/documentation/NetworkExtension/NEVPNManager/removeFromPreferences(completionHandler:))

Remove the VPN configuration from the Network Extension preferences.

### Accessing VPN configuration properties

[`isEnabled`](/documentation/NetworkExtension/NEVPNManager/isEnabled)

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

[`protocolConfiguration`](/documentation/NetworkExtension/NEVPNManager/protocolConfiguration)

An [`NEVPNProtocol`](/documentation/NetworkExtension/NEVPNProtocol) object containing the configuration settings of the VPN tunneling protocol.

[`protocol`](/documentation/NetworkExtension/NEVPNManager/protocol)

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

[`localizedDescription`](/documentation/NetworkExtension/NEVPNManager/localizedDescription)

A string containing the display name of the VPN configuration.

[`isOnDemandEnabled`](/documentation/NetworkExtension/NEVPNManager/isOnDemandEnabled)

A Boolean used to toggle the Connect On Demand capability.

[`onDemandRules`](/documentation/NetworkExtension/NEVPNManager/onDemandRules)

An ordered list of Connect On Demand rules.

### Connecting and disconnecting VPN

[`connection`](/documentation/NetworkExtension/NEVPNManager/connection)

An [`NEVPNConnection`](/documentation/NetworkExtension/NEVPNConnection) object that is used to control the VPN tunnel specified by the VPN configuration.

### Errors

[`NEVPNError.Code`](/documentation/NetworkExtension/NEVPNError-swift.struct/Code)

Codes that indicate the source of an error.

[`NEVPNErrorDomain`](/documentation/NetworkExtension/NEVPNErrorDomain)

[`NEVPNError.Code`](/documentation/NetworkExtension/NEVPNError-swift.struct/Code)

Codes that indicate the source of an error.

### Notifications

  <doc://com.apple.documentation/documentation/Foundation/NSNotification/Name-swift.struct/NEVPNConfigurationChange>

[`NEVPNConfigurationChangeNotification`](/documentation/NetworkExtension/NEVPNConfigurationChangeNotification)

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

### Entitlements

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.networking.vpn.api>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)