<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEFilterProvider/stopFilter(with:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEFilterProvider(im)stopFilterWithReason:completionHandler:"
  },
  "title" : "stopFilter(with:completionHandler:)"
}
-->

# stopFilter(with:completionHandler:)

Stop the filter.

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

## Parameters

`reason`

An `NEProviderStopReason` code indicating why the filter is being stopped. For a list of possible codes, see [`NEProvider`](/documentation/NetworkExtension/NEProvider).

`completionHandler`

A block that must be executed when the filter is fully stopped.

## Discussion

This method is called by the system to stop the filter.

`NEFilterProvider` subclasses must override this method.

---

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)