---
title: "startFilter(completionHandler:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/nefilterprovider/startfilter(completionhandler:)"
---

# startFilter(completionHandler:)

Start the filter.

## Declaration

```swift
func startFilter(completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func startFilter() async throws
```

## Parameters

- `completionHandler`: A block that must be executed when the filter is running and is ready to filter network content.

## Discussion

Discussion This method is called by the system to start the filter. NEFilterProvider subclasses must override this method. When this method is called, the Filter Provider should perform any steps necessary to initialize the filter and then execute the completionHandler block.

## See Also

### Managing the filter life cycle

- [stopFilter(with:completionHandler:)](networkextension/nefilterprovider/stopfilter(with:completionhandler:).md)
