---
title: "connect(to:completionHandler:)"
framework: corenfc
role: symbol
role_heading: Instance Method
path: "corenfc/nfctagreadersession/connect(to:completionhandler:)"
---

# connect(to:completionHandler:)

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

## Declaration

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

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

## Parameters

- `tag`: A tag to which the reader session should attempt to connect.
- `completionHandler`: A handler that the reader session invokes after completing the tag-connect request. The handler has the following parameter: The session calls completionHandler on the dispatch queue provided when creating the doc://com.apple.corenfc/documentation/CoreNFC/NFCTagReaderSession.

## Discussion

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.

## See Also

### Connecting to a Tag

- [connectedTag](corenfc/nfctagreadersession/connectedtag-3mlqu.md)
