An object to create and manage a content filter’s configuration.


class NEFilterManager : NSObject


Each app is allowed to create a single filter configuration. The NEFilterManager class has a class method (shared()) that provides access to a single NEFilterManager instance. This single instance corresponds to a single filter configuration.

The filter configuration is stored in the Network Extension preferences which are managed by the Network Extension framework. The filter configuration must be explicitly loaded into memory from the Network Extension preferences before it can be used, and any changes must be explicitly saved to the Network Extension preferences before taking effect on the system.

Profile Configuration

Filter configurations are created using configuration profiles. See the payload type in Configuration Profile Reference. To specify that a filter configuration created via a profile payload is associated with a particular app (and therefore allow the app to use NEFilterManager to manage the configuration), the app’s bundle identifier must be set as the value of the PluginBundleID field in the profile payload.

Filter Provider Extensions

Apps that use NEFilterManager are required to contain two Filter Provider extensions that together perform the task of examining network content and making pass and block decisions. See the NEFilterControlProvider and NEFilterDataProvider classes for more details about these extensions.


Managing the Filter Configuration

class func shared() -> NEFilterManager

Access the single instance of NEFilterManager.

func loadFromPreferences(completionHandler: (Error?) -> Void)

Load the filter configuration from the Network Extension preferences.

func saveToPreferences(completionHandler: (Error?) -> Void)

Save the filter configuration in the Network Extension preferences.

func removeFromPreferences(completionHandler: (Error?) -> Void)

Remove the filter configuration from the Network Extension preferences.

Accessing Filter Configuration Properties

var isEnabled: Bool

A Boolean used to toggle the enabled state of the filter.

var localizedDescription: String?

A string containing a description of the filter configuration.


static let NEFilterConfigurationDidChange: NSNotification.Name

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

Instance Properties


Inherits From

Conforms To

See Also

Filter Configuration

class NEFilterProviderConfiguration

Configuration parameters for a content filter.

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