<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARSessionObserver/session(_:didFailWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(pl)ARSessionObserver(im)session:didFailWithError:"
  },
  "title" : "session(_:didFailWithError:)"
}
-->

# session(_:didFailWithError:)

Tells the delegate that the session has stopped running due to an error.

```
optional func session(_ session: ARSession, didFailWithError error: any Error)
```

## Parameters

`session`

The session providing information.

`error`

An object describing the failure.

---

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)