<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreNFC",
  "identifier" : "/documentation/CoreNFC/NFCNDEFReaderSession/connect(to:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core NFC"
    ],
    "preciseIdentifier" : "c:objc(cs)NFCNDEFReaderSession(im)connectToTag:completionHandler:"
  },
  "title" : "connect(to:completionHandler:)"
}
-->

# connect(to:completionHandler:)

Connects the reader session to a tag and activates that tag.

```
func connect(to tag: any NFCNDEFTag, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```
func connect(to tag: any NFCNDEFTag) async throws
```

## Parameters

`tag`

A tag that the reader session should attempt connecting to.

`completionHandler`

A handler that the reader session invokes after completing the tag-connect request. The handler has the following parameter:

- error: `nil` when the session successfully connects to the tag; otherwise, an <doc://com.apple.documentation/documentation/Foundation/NSError> object.

    The session calls     `completionHandler`     on the dispatch queue provided when creating the [`NFCNDEFReaderSession`](/documentation/CoreNFC/NFCNDEFReaderSession)    .

## Discussion

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)