<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SecureElementCredential",
  "identifier" : "/documentation/SecureElementCredential/CredentialSession/ErrorCode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SecureElementCredential"
    ],
    "preciseIdentifier" : "s:23SecureElementCredential0C7SessionC9ErrorCodeO"
  },
  "title" : "CredentialSession.ErrorCode"
}
-->

# CredentialSession.ErrorCode

An error encountered by a credential session.

```
enum ErrorCode
```

## Topics

### Authorization and permission error codes

[`CredentialSession.ErrorCode.userNotAuthorized`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/userNotAuthorized)

The person using the app isn’t authorized to perform the operation.

[`CredentialSession.ErrorCode.accessDenied`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/accessDenied)

The person using the app declined to grant permission for the operation.

[`CredentialSession.ErrorCode.clientNotInForeground`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/clientNotInForeground)

Your app isn’t in the foreground, which is required to use the credential session.

[`CredentialSession.ErrorCode.userCanceledAuthorization`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/userCanceledAuthorization)

The person using the app dismissed the authorization sheet.

[`CredentialSession.ErrorCode.userAuthorizationTimedOut`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/userAuthorizationTimedOut)

Authorization timed out while waiting for the person using the app.

[`CredentialSession.ErrorCode.featureUnavailable`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/featureUnavailable)

The feature is unavailable.

[`CredentialSession.ErrorCode.ineligible`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/ineligible)

The current device and user configuation are ineligible to use this service.

[`CredentialSession.ErrorCode.conditionsNotSatisfied`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/conditionsNotSatisfied)

The iCloud account or passcode of the person using the app don’t satisfy the conditions to use this service.

### Credential error codes

[`CredentialSession.ErrorCode.invalidCredentialState`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidCredentialState)

A credential is in a state that doesn’t permit that function.

[`CredentialSession.ErrorCode.credentialDoesNotExist`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/credentialDoesNotExist)

The credential doesn’t exist, or you don’t have access to it.

[`CredentialSession.ErrorCode.instanceDoesNotExist`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/instanceDoesNotExist)

The instance doesn’t exist in the target credential.

### Session error codes

[`CredentialSession.ErrorCode.invalidSessionState`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidSessionState)

The session is in a state that doesn’t permit that function.

[`CredentialSession.ErrorCode.sessionInvalidated`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/sessionInvalidated)

The client requested invalidation of the session.

### Command error codes

[`CredentialSession.ErrorCode.commandNotSupported`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/commandNotSupported)

Your app attempted an unsupported Secure Element command.

### Network-related error codes

[`CredentialSession.ErrorCode.network`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/network)

The device’s internet connection is offline.

### Presentment intent assertion error codes

[`CredentialSession.ErrorCode.presentmentIntentAssertionTimeout`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/presentmentIntentAssertionTimeout)

The presentment intent assertion timed out.

### UIKit error codes

[`CredentialSession.ErrorCode.invalidView`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidView)

The provided UIKit view is invalid.

### Hardware error codes

[`CredentialSession.ErrorCode.insufficientSpace`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/insufficientSpace)

The hardware storage has insufficient space for the attempted provisioning.

### Temporary error codes

[`CredentialSession.ErrorCode.resourceUnavailable`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/resourceUnavailable)

The requested resource is unavailable.

[`CredentialSession.ErrorCode.acquiredResourceRelinquished`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/acquiredResourceRelinquished)

The system relinquished an underlying shared resource, preventing the operation from completing.

### Miscellaneous error codes

[`CredentialSession.ErrorCode.invalidInput`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/invalidInput)

One or more parameters is invalid.

[`CredentialSession.ErrorCode.internalError`](/documentation/SecureElementCredential/CredentialSession/ErrorCode/internalError)

The framework encountered an internal error.



---

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)