<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEAppPushProvider/stop(with:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:objc(cs)NEAppPushProvider(im)stopWithReason:completionHandler:"
  },
  "title" : "stop(with:completionHandler:)"
}
-->

# stop(with:completionHandler:)

Indicates that the framework needs to stop the provider.

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

```
func stop(with reason: NEProviderStopReason) async
```

## Parameters

`reason`

An [`NEProviderStopReason`](/documentation/NetworkExtension/NEProviderStopReason) that indicates why the provider needs to stop.

`completionHandler`

A block that your provider subclass calls after it completely stops.

## Discussion

An [`NEAppPushProvider`](/documentation/NetworkExtension/NEAppPushProvider) subclass must override this method to perform any necessary tasks when stopping communication with the server.

---

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)