---
title: willTerminate()
framework: photos
role: symbol
role_heading: Instance Method
path: photos/phbackgroundresourceuploadjobextension/willterminate()
---

# willTerminate()

Called by the host before suspending or terminating the extension process. Extension clients should use this to stop any in-progress work. When the extension is activated again, a new call will be made by the host.

## Declaration

```swift
func willTerminate() async
```

## Mentioned in

Uploading asset resources in the background
