---
title: NEFilterControlProvider
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/nefiltercontrolprovider
---

# NEFilterControlProvider

The principal class for a filter control provider extension.

## Declaration

```swift
class NEFilterControlProvider
```

## Overview

Overview The Filter Control Provider’s primary responsibility is to provide information to the associated Filter Data Provider so that it can perform its task of accurately filtering network content. There are several ways in which the Filter Control Provider provides data to the associated Filter Data Provider: By writing information to disk. For example, the Filter Control Provider can maintain a database of filtering rules on disk in a location where the Filter Data Provider can read from the database. By defining a dictionary that maps keys to sets of customization parameters to be used when generating the block page. The Filter Data Provider gives the system the key for the desired customization parameters, and the system uses that key to get the customization parameters from the Filter Control Provider and generate the customized block page. By defining a dictionary that maps keys to strings to be appended to URLs. The Filter Data Provider gives the system the key for the string to be appended, and the system uses that key to get the string to be appended from the Filter Control Provider and appends the string to the URL. important: To use the NEFilterControlProvider class, you must enable the Network Extensions capability in Xcode and select the Content Filter capability. See Configure network extensions. Creating a Filter Control Provider Extension Filter Control Providers run as App Extensions for the com.apple.networkextension.filter-control extension point. To create a Filter Control Provider extension, first create a new App Extension target in your project. For an example of an Xcode build target for this app extension, see the SimpleTunnel: Customized Networking Using the NetworkExtension Framework sample code project. Once you have a Filter Control Provider extension target, create a sub-class of NEFilterControlProvider. Then, set the NSExtensionPrincipalClass key in the the extension’s Info.plist to the name of your subclass. If it is not already, set the NSExtensionPointIdentifier key in the extension’s Info.plist to com.apple.networkextension.filter-control. Here is an example of the NSExtension dictionary in a Filter Control Provider extension’s Info.plist: <key>NSExtension</key> <dict>     <key>NSExtensionPointIdentifier</key>     <string>com.apple.networkextension.filter-control</string>     <key>NSExtensionPrincipalClass</key>     <string>MyCustomFilterControlProvider</string> </dict> Finally, add your Filter Control Provider extension target to your app’s Embed App Extensions build phase.

## Topics

### Handling requests for new rules

- [handleNewFlow(_:completionHandler:)](networkextension/nefiltercontrolprovider/handlenewflow(_:completionhandler:).md)
- [notifyRulesChanged()](networkextension/nefiltercontrolprovider/notifyruleschanged().md)

### Handling remediation

- [handleRemediation(for:completionHandler:)](networkextension/nefiltercontrolprovider/handleremediation(for:completionhandler:).md)
- [remediationMap](networkextension/nefiltercontrolprovider/remediationmap.md)
- [NEFilterProviderRemediationMapRemediationButtonTexts](networkextension/nefilterproviderremediationmapremediationbuttontexts.md)
- [NEFilterProviderRemediationMapRemediationURLs](networkextension/nefilterproviderremediationmapremediationurls.md)
- [NEFilterProviderRemediationURLFlowURL](networkextension/nefilterproviderremediationurlflowurl.md)
- [NEFilterProviderRemediationURLFlowURLHostname](networkextension/nefilterproviderremediationurlflowurlhostname.md)
- [NEFilterProviderRemediationURLOrganization](networkextension/nefilterproviderremediationurlorganization.md)
- [NEFilterProviderRemediationURLUsername](networkextension/nefilterproviderremediationurlusername.md)
- [urlAppendStringMap](networkextension/nefiltercontrolprovider/urlappendstringmap.md)

## Relationships

### Inherits From

- [NEFilterProvider](networkextension/nefilterprovider.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Data and control providers

- [NEFilterDataProvider](networkextension/nefilterdataprovider.md)
- [NEFilterPacketProvider](networkextension/nefilterpacketprovider.md)
- [NEFilterProvider](networkextension/nefilterprovider.md)
