<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreNFC",
  "identifier" : "/documentation/CoreNFC/CardSession/init()",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core NFC"
    ],
    "preciseIdentifier" : "s:7CoreNFC11CardSessionCACyYaKcfc"
  },
  "title" : "init()"
}
-->

# init()

Creates a contactless card session.

```
init() async throws
```

## 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 ``doc://com.apple.corenfc/documentation/CoreNFC/CardSession/isSupported`` and ``doc://com.apple.corenfc/documentation/CoreNFC/CardSession/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`](/documentation/CoreNFC/CardSession/Error) if it can’t create a card session. Possible error conditions are:

- [`CardSession.Error.accessNotAccepted`](/documentation/CoreNFC/CardSession/Error/accessNotAccepted)
- [`CardSession.Error.systemEligibilityFailed`](/documentation/CoreNFC/CardSession/Error/systemEligibilityFailed)
- [`CardSession.Error.radioDisabled`](/documentation/CoreNFC/CardSession/Error/radioDisabled)
- [`CardSession.Error.systemNotAvailable`](/documentation/CoreNFC/CardSession/Error/systemNotAvailable)

---

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)