---
title: willTerminate()
framework: FinanceKit
role: symbol
role_heading: Instance Method
platforms: [iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+]
path: financekit/backgrounddeliveryextensionproviding/willterminate()
---

# willTerminate()

Get alerted when a BackgroundDeliveryExtension is about to close.

## Declaration

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

## Discussion

Discussion This is called when the extension approaches the end of its time window and is about to be terminated by the system. It provides an opportunity to safely end any ongoing operations and save changes to data. When the time window is exceeded, the extension terminates even if execution is within willTerminate. important: For certain system events, willTerminate may not be called before the extension is terminated.

## See Also

### Instance Methods

- [didReceiveData(for:)](financekit/backgrounddeliveryextensionproviding/didreceivedata(for:).md)
