<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchConnectivity",
  "identifier" : "/documentation/WatchConnectivity/WCSessionDelegate/session(_:didFinish:error:)-6dtcu",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Watch Connectivity"
    ],
    "preciseIdentifier" : "c:objc(pl)WCSessionDelegate(im)session:didFinishFileTransfer:error:"
  },
  "title" : "session(_:didFinish:error:)"
}
-->

# session(_:didFinish:error:)

Tells the delegate that a file transfer has finished successfully or ended because of an error.

```
optional func session(_ session: WCSession, didFinish fileTransfer: WCSessionFileTransfer, error: (any Error)?)
```

## Parameters

`session`

The session object of the current process.

`fileTransfer`

An object containing information about the file that was transferred.

`error`

An error object if a problem occurred.

## Discussion

The session object calls this method when a file transfer initiated by the current app finished, either successfully or unsuccessfully. Use this method to note that the transfer completed or to respond to errors, perhaps by trying to send the file again at a later time.

This method is called on a background thread of your app.

---

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)