restartPolling
TypeScriptrestartPolling(): voidSwift declarationfunc restartPolling()class · iOS 13.0+ · SDK 27.1
class NFCTagReaderSessionrestartPolling(): voidSwift declarationfunc restartPolling()get connectedTag(): (NFCTag) | nullSwift declarationvar connectedTag: NFCTag? { get }Current connected tag object.
static initConfigurationDelegateQueue(configuration: NFCTagReaderSession_Configuration, delegate: SDKHandle, queue?: (_Dispatch_DispatchQueue) | null): NFCTagReaderSessionSwift declarationconvenience init(configuration: NFCTagReaderSession.Configuration, delegate: any NFCTagReaderSessionDelegate, queue: DispatchQueue? = nil)Creates a new NFCTagReaderSession instance. - Parameters: - configuration: Reader configuration used for the session. The config is applied when `begin()` or `restartPolling()` is called. - delegate: The session will hold a weak ARC reference to this `NFCTagReaderSessionDelegate` object. - queue: A dispatch queue where `NFCTagReaderSessionDelegate` delegate callbacks will be dispatched to. A nil value will cause the creation of a serial dispatch queue internally for the session. The session object will retain the provided dispatch queue.
static initPollingOptionDelegateQueue(pollingOption: NFCTagReaderSession_PollingOption, delegate: SDKHandle, queue?: (_Dispatch_DispatchQueue) | null): (NFCTagReaderSession) | nullSwift declarationconvenience init?(pollingOption: NFCTagReaderSession.PollingOption, delegate: any NFCTagReaderSessionDelegate, queue: DispatchQueue? = nil)Creates a new NFCTagReaderSession instance. - Parameters: - pollingOption: Configures the RF polling of the reader session; multiple options can be OR'ed together. This option affects the possible NFC tag type discover. - delegate: The session will hold a weak ARC reference to this `NFCTagReaderSessionDelegate` object. - queue: A dispatch queue where `NFCTagReaderSessionDelegate` delegate callbacks will be dispatched to. A nil value will cause the creation of a serial dispatch queue internally for the session. The session object will retain the provided dispatch queue.
restartPollingConfiguration(configuration: NFCTagReaderSession_Configuration): voidSwift declarationfunc restartPolling(configuration: NFCTagReaderSession.Configuration)Restart the polling sequence in this session to discover new tags using the provided configuration. New tags discovered from polling will return in the subsequent `NFCTagReaderSessionDelegate.tagReaderSession(_:, didDetect:)` call. Tags that are returned previously by `NFCTagReaderSessionDelegate.tagReaderSession(_:, didDetect:)` will become invalid, and all references to these tags shall be removed to properly release the resources. Calling this method on an invalidated session will have no effect; a new reader session is required to restart the reader.
connectToCompletionHandler(tag: NFCTag, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declaration@preconcurrency func connect(to tag: NFCTag, completionHandler: @escaping @Sendable ((any Error)?) -> Void)This method establishes a tag connection and activates the tag. Connecting to the same tag that is currently opened has no effect. Connecting to a different tag will automatically terminate the previous tag connection and put it into the halt state. Tag stays in the connected state until another tag is connected or the polling is restarted. - Parameters: - tag: A `NFCTag` object that will be connect to. - completionHandler: Completion handler called when the operation is completed. `error` is nil if operation succeeds. A `NFCErrorDomain` error is returned when there is a communication issue with the tag.
connectTo(tag: NFCTag): Promise<void>Swift declarationfunc connect(to tag: NFCTag) async throwsThis method establishes a tag connection and activates the tag. Connecting to the same tag that is currently opened has no effect. Connecting to a different tag will automatically terminate the previous tag connection and put it into the halt state. Tag stays in the connected state until another tag is connected or the polling is restarted. - Parameters: - tag: A `NFCTag` object that will be connect to. - completionHandler: Completion handler called when the operation is completed. `error` is nil if operation succeeds. A `NFCErrorDomain` error is returned when there is a communication issue with the tag.
3 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
NFCTagReaderSession.init(configuration:delegate:queue:)
The iOS SDK compiler rejected this binding: 'NFCTagReaderSessionConfiguration' is unavailable in Swift: Use NFCTagReaderSession.Configuration
NFCTagReaderSession.restartPolling(with:)
The iOS SDK compiler rejected this binding: 'NFCTagReaderSessionConfiguration' is unavailable in Swift: Use NFCTagReaderSession.Configuration
NFCTagReaderSession.init()
inherited init: cannot prove legal (class declares 3 custom initializers)