Skip to content

ReaderError

treastrain edited this page May 5, 2021 · 1 revision

ReaderError

Possible errors returned by NFCKit and CoreNFC framework reader session.

public struct ReaderError: Error, LocalizedError, CustomNSError 

Inheritance

CustomNSError, Equatable, Error, LocalizedError

Initializers

init(_:userInfo:description:)

Initialize an error within this domain with the given code and userInfo.

public init(_ code: Code, userInfo: [String : Any] = [:], description: String? = nil) 

init(from:)

os(iOS) && !targetEnvironment(macCatalyst)
@available(iOS 11.0, *)
    public init(from coreNFCInstance: CoreNFC.NFCReaderError) 

Properties

readerErrorUnsupportedFeature

NFCKit is not supported on the current platform.

public static var readerErrorUnsupportedFeature: Code = .readerErrorUnsupportedFeature

readerErrorSecurityViolation

Missing required entitlement and/or privacy settings from the client app.

public static var readerErrorSecurityViolation: Code = .readerErrorSecurityViolation

readerErrorInvalidParameter

Input parameter is invalid.

public static var readerErrorInvalidParameter: Code = .readerErrorInvalidParameter

readerErrorInvalidParameterLength

Length of input parameter is invalid, i.e. size of data container.

public static var readerErrorInvalidParameterLength: Code = .readerErrorInvalidParameterLength

readerErrorParameterOutOfBound

Parameter value is outside of the acceptable boundary / range.

public static var readerErrorParameterOutOfBound: Code = .readerErrorParameterOutOfBound

readerErrorRadioDisabled

NFC Radio is disabled.

public static var readerErrorRadioDisabled: Code = .readerErrorRadioDisabled

readerTransceiveErrorTagConnectionLost

Connection to the tag is lost.

public static var readerTransceiveErrorTagConnectionLost: Code = .readerTransceiveErrorTagConnectionLost

readerTransceiveErrorRetryExceeded

Maximum data transmission retry has reached.

public static var readerTransceiveErrorRetryExceeded: Code = .readerTransceiveErrorRetryExceeded

readerTransceiveErrorTagResponseError

Tag response is invalid or tag does not provide a response. Additional error information may be contain in the underlying user info dictionary.

public static var readerTransceiveErrorTagResponseError: Code = .readerTransceiveErrorTagResponseError

readerTransceiveErrorSessionInvalidated

Session has been previously invalidated.

public static var readerTransceiveErrorSessionInvalidated: Code = .readerTransceiveErrorSessionInvalidated

readerTransceiveErrorPacketTooLong

Packet length has exceeded the limit.

public static var readerTransceiveErrorPacketTooLong: Code = .readerTransceiveErrorPacketTooLong

readerTransceiveErrorTagNotConnected

Tag is not in the connected state.

public static var readerTransceiveErrorTagNotConnected: Code = .readerTransceiveErrorTagNotConnected

readerSessionInvalidationErrorUserCanceled

Session is invalidated by the user.

public static var readerSessionInvalidationErrorUserCanceled: Code = .readerSessionInvalidationErrorUserCanceled

readerSessionInvalidationErrorSessionTimeout

Session is timed out.

public static var readerSessionInvalidationErrorSessionTimeout: Code = .readerSessionInvalidationErrorSessionTimeout

readerSessionInvalidationErrorSessionTerminatedUnexpectedly

Session is terminated unexpectly.

public static var readerSessionInvalidationErrorSessionTerminatedUnexpectedly: Code = .readerSessionInvalidationErrorSessionTerminatedUnexpectedly

readerSessionInvalidationErrorSystemIsBusy

Core NFC is temporary unavailable due to system resource constraints.

public static var readerSessionInvalidationErrorSystemIsBusy: Code = .readerSessionInvalidationErrorSystemIsBusy

readerSessionInvalidationErrorFirstNDEFTagRead

Session is terminated after the 1st NDEF tag is read.

public static var readerSessionInvalidationErrorFirstNDEFTagRead: Code = .readerSessionInvalidationErrorFirstNDEFTagRead

tagCommandConfigurationErrorInvalidParameters

public static var tagCommandConfigurationErrorInvalidParameters: Code = .tagCommandConfigurationErrorInvalidParameters

ndefReaderSessionErrorTagNotWritable

NDEF tag is not writable.

public static var ndefReaderSessionErrorTagNotWritable: Code = .ndefReaderSessionErrorTagNotWritable

ndefReaderSessionErrorTagUpdateFailure

NDEF tag write fails.

public static var ndefReaderSessionErrorTagUpdateFailure: Code = .ndefReaderSessionErrorTagUpdateFailure

ndefReaderSessionErrorTagSizeTooSmall

NDEF tag memory size is too small to store the desired data.

public static var ndefReaderSessionErrorTagSizeTooSmall: Code = .ndefReaderSessionErrorTagSizeTooSmall

ndefReaderSessionErrorZeroLengthMessage

NDEF tag does not contain any NDEF message.

public static var ndefReaderSessionErrorZeroLengthMessage: Code = .ndefReaderSessionErrorZeroLengthMessage

errorDomain

public static var errorDomain: String = ErrorDomain

code

public var code: Code

errorCode

public var errorCode: Int

errorUserInfo

public var errorUserInfo: [String : Any]

errorDescription

public var errorDescription: String?

Operators

==

public static func == (lhs: ReaderError, rhs: ReaderError) -> Bool 

==

os(iOS) && !targetEnvironment(macCatalyst)
@available(iOS 11.0, *)
    public static func == (lhs: ReaderError, rhs: CoreNFC.NFCReaderError) -> Bool 

==

os(iOS) && !targetEnvironment(macCatalyst)
@available(iOS 11.0, *)
    public static func == (lhs: CoreNFC.NFCReaderError, rhs: ReaderError) -> Bool 
Clone this wiki locally