invalidate(errorMessage:)
Closes the reader session and displays an error message to the user.
Declaration
func invalidate(errorMessage: String)Parameters
- errorMessage:
The error message to display.
Discussion
Use this method to end the reader session and display a message to the user when an error condition occurs after the app successfully reads a tag. This type of error can occur if, for example, the app reads data from an NFC tag, but determines that the data has expired and discards it. The app then calls invalidate(errorMessage:) to end the reader session, and to let the user know why it discarded the data.