Class

NEProvider

An abstract base class for all NetworkExtension providers.

Declaration

class NEProvider : NSObject

Overview

See the documentation for the NEProvider subclasses for details about how to create Network Extension Provider extensions.

The NEProvider class and its subclasses expose methods and properties that allow Network Extension Provider extensions to participate in and affect the network data path on iOS and macOS. For example, the handleNewFlow: method in NEFilterDataProvider allows Filter Data Provider extensions to make pass/block decisions on TCP connections as the connections are established on the system.

Subclassing Notes

The NEProvider class should not be subclassed directly. Instead, you should create subclasses of NEProvider subclasses (and in some cases subsubclasses).

Methods to Override

Topics

Handling Sleep and Wake

func wake()

Handle a wake event.

Monitoring the Network State

var defaultPath: NWPath?

The current default network path used for connections created by the provider.

Constants

enum NEProviderStopReason

Reasons why the provider extension was stopped.

Notifying the User

func displayMessage(String, completionHandler: (Bool) -> Void)

Call this method from your NEProvider subclass if you want to display a message to the user.

Deprecated

Relationships

Inherits From

Conforms To

See Also

Packet Tunnel Provider

class NEPacketTunnelProvider

The principal class for a packet tunnel provider app extension.

class NEPacketTunnelNetworkSettings

The configuration for a packet tunnel provider’s virtual interface.

class NETunnelNetworkSettings

The configuration for a tunnel provider’s virtual interface.