Class

NEProvider

An abstract base class for all NetworkExtension providers.

Declaration

@interface 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

- sleepWithCompletionHandler:

Handle a sleep event.

- wake

Handle a wake event.

Creating Network Connections

Monitoring the Network State

defaultPath

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

Constants

NEProviderStopReason

Reasons why the provider extension was stopped.

Notifying the User

- displayMessage:completionHandler:

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

Deprecated

Relationships

Inherits From

See Also

Packet Tunnel Provider

NEPacketTunnelProvider

The principal class for a packet tunnel provider app extension.

NETunnelProvider

An abstract base class shared by NEPacketTunnelProvider and NEAppProxyProvider.

NEPacketTunnelNetworkSettings

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

NETunnelNetworkSettings

The configuration for a tunnel provider’s virtual interface.