<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHBackgroundResourceUploadJobExtension/willTerminate()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "s:6Photos38PHBackgroundResourceUploadJobExtensionP13willTerminateyyYaF"
  },
  "title" : "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.

```
func willTerminate() async
```

---

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)