<!--
{
  "availability" : [
    "macOS: 15.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSTask/didComplete(error:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(cs)FSTask(im)didCompleteWithError:"
  },
  "title" : "didComplete(error:)"
}
-->

# didComplete(error:)

Informs the client that the task completed.

```
func didComplete(error: (any Error)?)
```

## Parameters

`error`

`nil` if the task completed successfully; otherwise, an error that caused the task to fail.

---

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)