---
title: "createNFCSlot(message:completion:)"
framework: cryptotokenkit
role: symbol
role_heading: Instance Method
path: "cryptotokenkit/tksmartcardslotmanager/createnfcslot(message:completion:)"
---

# createNFCSlot(message:completion:)

Creates an NFC smart card slot using the device’s hardware and presents a system UI.

## Declaration

```swift
func createNFCSlot(message: String?, completion: @escaping @Sendable (TKSmartCardSlotNFCSession?, (any Error)?) -> Void)
```

```swift
func createNFCSlot(message: String?) async throws -> TKSmartCardSlotNFCSession
```

## Parameters

- `message`: Message shown in the system-presented UI
- `completion`: Completion handler which returns the NFC session of the created slot or an error on failure. If an NFC slot already exists and current caller is not the initial creator TKErrorCodeObjectNotFound error is returned.

## Discussion

Discussion To finish the NFC session and dismiss the system-presented UI use TKSmartCardSlotNFCSession.endSession.
