-
Notifications
You must be signed in to change notification settings - Fork 34
connect(to_resultHandler_)
treastrain edited this page Oct 16, 2021
·
2 revisions
canImport(CoreNFC)
-
Connects the reader session to a tag and activates that tag.
@available(iOS 13.0, *) open func connect(to tag: NFCNDEFTag, resultHandler: @escaping ((Result<Void, NFCReaderError>)) -> Void)
A tag stays connected until your app connects to a different tag or restarts polling. Connecting to a tag that is already connected has no effect.
- tag: A tag to which the reader session should attempt to connect.
- resultHandler: A handler that the reader session invokes after the operation completes. The handler receives a Result with the cases:
- success: A
Void
. - failure: An
NFCReaderError
object indicating that a communication issue with the tag occurred.
canImport(CoreNFC)
-
Connects the reader session to a tag and activates that tag.
@available(iOS 13.0, *) open func connect(to tag: NFCTag, resultHandler: @escaping ((Result<Void, NFCReaderError>)) -> Void)
A tag stays connected until your app connects to a different tag or restarts polling. Connecting to a tag that is already connected has no effect.
- tag: A tag to which the reader session should attempt to connect.
- resultHandler: A handler that the reader session invokes after the operation completes. The handler receives a Result with the cases:
- success: A
Void
. - failure: An
NFCReaderError
object indicating that a communication issue with the tag occurred.
Generated at 2021-10-28T15:36:42+0000 using swift-doc 1.0.0-rc.1.