---
title: "stop(with:completionHandler:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/neapppushprovider/stop(with:completionhandler:)"
---

# stop(with:completionHandler:)

Indicates that the framework needs to stop the provider.

## Declaration

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

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

## Parameters

- `reason`: An doc://com.apple.networkextension/documentation/NetworkExtension/NEProviderStopReason that indicates why the provider needs to stop.
- `completionHandler`: A block that your provider subclass calls after it completely stops.

## Mentioned in

Maintaining a Reliable Network Connection

## Discussion

Discussion An NEAppPushProvider subclass must override this method to perform any necessary tasks when stopping communication with the server.

## See Also

### Implementing provider life cycle

- [start()](networkextension/neapppushprovider/start().md)
- [start(completionHandler:)](networkextension/neapppushprovider/start(completionhandler:).md)
- [handleTimerEvent()](networkextension/neapppushprovider/handletimerevent().md)
