---
title: "readerSession(_:didInvalidateWithError:)"
framework: corenfc
role: symbol
role_heading: Instance Method
path: "corenfc/nfcvasreadersessiondelegate/readersession(_:didinvalidatewitherror:)"
---

# readerSession(_:didInvalidateWithError:)

Tells the delegate that the session become invalid and provides the reason.

## Declaration

```swift
func readerSession(_ session: NFCVASReaderSession, didInvalidateWithError error: any Error)
```

## Parameters

- `session`: The reader session that calls this method.
- `error`: The error indicating the reason for invalidating the session.

## Discussion

Discussion Your app should release any references it has to the reader session that called this method.
