Enumeration

LAError.Code

Error codes that the framework returns when policy evaluation fails.

Topics

Cancellation

case appCancel

The app canceled authentication.

case systemCancel

The system canceled authentication.

case userCancel

The user tapped the cancel button in the authentication dialog.

Biometry Failure

static var biometryLockout: LAError.Code

Biometry is locked because there were too many failed attempts.

static var biometryNotAvailable: LAError.Code

Biometry is not available on the device.

static var biometryNotEnrolled: LAError.Code

The user has no enrolled biometric identities.

case touchIDLockout

Touch ID is locked because there were too many failed attempts.

Deprecated
case touchIDNotAvailable

Touch ID is not available on the device.

Deprecated
case touchIDNotEnrolled

The user has no enrolled Touch ID fingers.

Deprecated

Other Errors

case authenticationFailed

The user failed to provide valid credentials.

case invalidContext

The context was previously invalidated.

case notInteractive

Displaying the required authentication user interface is forbidden.

case passcodeNotSet

A passcode isn’t set on the device.

case userFallback

The user tapped the fallback button in the authentication dialog, but no fallback is available for the authentication policy.

Supporting Constants

var kLAErrorDomain: String

The error domain used by LocalAuthentication.

var kLAErrorAppCancel: Int32

The app canceled authentication.

var kLAErrorSystemCancel: Int32

The system canceled authentication.

var kLAErrorUserCancel: Int32

The user tapped the cancel button in the authentication dialog.

var kLAErrorBiometryLockout: Int32

Biometry is locked because there were too many failed attempts.

var kLAErrorBiometryNotAvailable: Int32

Biometry is not available on the device.

var kLAErrorBiometryNotEnrolled: Int32

The user has no enrolled biometric identities.

var kLAErrorTouchIDLockout: Int32

Touch ID is locked because there were too many failed attempts.

var kLAErrorTouchIDNotAvailable: Int32

Touch ID is not available on the device.

var kLAErrorTouchIDNotEnrolled: Int32

The user has no enrolled Touch ID fingers.

var kLAErrorAuthenticationFailed: Int32

The user failed to provide valid credentials.

var kLAErrorInvalidContext: Int32

The context was previously invalidated.

var kLAErrorNotInteractive: Int32

Displaying the required authentication user interface is forbidden.

var kLAErrorPasscodeNotSet: Int32

A passcode isn’t set on the device.

var kLAErrorUserFallback: Int32

The user tapped the fallback button in the authentication dialog, but no fallback is available for the authentication policy.

See Also

Error Codes

static var appCancel: LAError.Code

The app canceled authentication.

static var systemCancel: LAError.Code

The system canceled authentication.

static var userCancel: LAError.Code

The user tapped the cancel button in the authentication dialog.

static var biometryLockout: LAError.Code

Biometry is locked because there were too many failed attempts.

static var biometryNotAvailable: LAError.Code

Biometry is not available on the device.

static var biometryNotEnrolled: LAError.Code

The user has no enrolled biometric identities.

static var touchIDLockout: LAError.Code

Touch ID is locked because there were too many failed attempts.

Deprecated
static var touchIDNotAvailable: LAError.Code

Touch ID is not available on the device.

Deprecated
static var touchIDNotEnrolled: LAError.Code

The user has no enrolled Touch ID fingers.

Deprecated
static var authenticationFailed: LAError.Code

The user failed to provide valid credentials.

static var invalidContext: LAError.Code

The context was previously invalidated.

static var notInteractive: LAError.Code

Displaying the required authentication user interface is forbidden.

static var passcodeNotSet: LAError.Code

A passcode isn’t set on the device.

static var userFallback: LAError.Code

The user tapped the fallback button in the authentication dialog, but no fallback is available for the authentication policy.