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

# NEFilterManager

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

```
class NEFilterManager
```

## Overview

Each app is allowed to create a single filter configuration. The [`NEFilterManager`](/documentation/NetworkExtension/NEFilterManager) class has a class method ([`shared()`](/documentation/NetworkExtension/NEFilterManager/shared())) that provides access to a single [`NEFilterManager`](/documentation/NetworkExtension/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.

> Important:
> In product builds for distribution, Network Content Filter configurations can be created only on supervised devices. During development and testing you can temporarily override this restriction by signing your build with the `get-task-allow` entitlement.

> Important:
> To use the ``doc://com.apple.networkextension/documentation/NetworkExtension/NEFilterManager`` class, you must enable the Network Extensions capability in Xcode and select the Content Filter capability. See [Configure network extensions](http://help.apple.com/xcode/mac/current/#/dev0b2ef6f08).

### Profile Configuration

Filter configurations are created using configuration profiles. See <doc://com.apple.documentation/documentation/DeviceManagement/WebContentFilter> for more information. 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`](/documentation/NetworkExtension/NEFilterControlProvider) and [`NEFilterDataProvider`](/documentation/NetworkExtension/NEFilterDataProvider) classes for more details about these extensions.

## Topics

### Managing the filter configuration

[`+  sharedManager`](/documentation/NetworkExtension/NEFilterManager/shared())

Access the single instance of `NEFilterManager`.

[`-  loadFromPreferencesWithCompletionHandler:`](/documentation/NetworkExtension/NEFilterManager/loadFromPreferences(completionHandler:))

Load the filter configuration from the Network Extension preferences.

[`-  saveToPreferencesWithCompletionHandler:`](/documentation/NetworkExtension/NEFilterManager/saveToPreferences(completionHandler:))

Save the filter configuration in the Network Extension preferences.

[`-  removeFromPreferencesWithCompletionHandler:`](/documentation/NetworkExtension/NEFilterManager/removeFromPreferences(completionHandler:))

Remove the filter configuration from the Network Extension preferences.

### Accessing filter configuration properties

[`enabled`](/documentation/NetworkExtension/NEFilterManager/isEnabled)

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

[`providerConfiguration`](/documentation/NetworkExtension/NEFilterManager/providerConfiguration)

A [`NEFilterProviderConfiguration`](/documentation/NetworkExtension/NEFilterProviderConfiguration) object containing the filter configuration settings.

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

A string containing a description of the filter configuration.

### Prioritizing filters

[`grade`](/documentation/NetworkExtension/NEFilterManager/grade-swift.property)

The grade of the filter, which determines when it acts relative to other filters.

[`Grade`](/documentation/NetworkExtension/NEFilterManager/Grade-swift.enum)

A type for the grade or priority of the filter.

### Errors

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

The domain for errors resulting from calls to the filter manager.

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

Error codes specific to filter managers.

### Notifications

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

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

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

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)