---
title: init()
framework: corenfc
role: symbol
role_heading: Initializer
path: corenfc/cardsession/init()
---

# init()

Creates a contactless card session.

## Declaration

```swift
init() async throws
```

## Discussion

Discussion Creating a card session depends on the following conditions: The device is eligible to use a card session. The person using the app has accepted the app’s request to use a card session. tip: Query the isSupported and isEligible properties before calling this initializer to avoid showing a system card session UI on ineligible devices. This initializer throws an error of type CardSession.Error if it can’t create a card session. Possible error conditions are: CardSession.Error.accessNotAccepted CardSession.Error.systemEligibilityFailed CardSession.Error.radioDisabled CardSession.Error.systemNotAvailable

## See Also

### Creating a card session

- [CardSession.Error](corenfc/cardsession/error.md)
