---
title: "stopFilter(with:completionHandler:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/nefilterprovider/stopfilter(with:completionhandler:)"
---

# stopFilter(with:completionHandler:)

Stop the filter.

## Declaration

```swift
func stopFilter(with reason: NEProviderStopReason, completionHandler: @escaping @Sendable () -> Void)
```

```swift
func stopFilter(with reason: NEProviderStopReason) async
```

## Parameters

- `reason`: An NEProviderStopReason code indicating why the filter is being stopped. For a list of possible codes, see doc://com.apple.networkextension/documentation/NetworkExtension/NEProvider.
- `completionHandler`: A block that must be executed when the filter is fully stopped.

## Discussion

Discussion This method is called by the system to stop the filter. NEFilterProvider subclasses must override this method.

## See Also

### Managing the filter life cycle

- [startFilter(completionHandler:)](networkextension/nefilterprovider/startfilter(completionhandler:).md)
