---
title: didFinish()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/wkurlschemetask/didfinish()
---

# didFinish()

Signals the successful completion of the task.

## Declaration

```swift
func didFinish()
```

## Discussion

Discussion This method signals to WebKit that it has all of the resource’s data and the task is now complete. Call this method after sending a response and the resource data to WebKit using the didReceive(_:) and didReceive(_:) methods. This method raises an exception if you call it before the didReceive(_:) method, or if the task is already complete. It also raises an exception if you call it after WebKit calls the webView(_:stop:) method of the corresponding handler object.

## See Also

### Reporting Progress Back to WebKit

- [didReceive(_:)](webkit/wkurlschemetask/didreceive(_:)-2u23r.md)
- [didReceive(_:)](webkit/wkurlschemetask/didreceive(_:)-8t5f8.md)
