Structure

LAError

Errors issued by the LocalAuthentication framework.

Declaration

struct LAError

Topics

Error Characteristics

static var errorDomain: String

The error domain that the framework uses when issuing errors.

let LAErrorDomain: String

The error domain that the framework uses when issuing errors.

var errorCode: Int

The error code the framework returns when policy evaluation fails.

var errorUserInfo: [String : Any]

A dictionary the framework uses to provide information about an error.

var localizedDescription: String

A human readable, localized description of the error.

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.

static var watchNotAvailable: LAError.Code

An attempt to authenticate with Apple Watch failed.

Beta
enum LAError.Code

Error codes that the framework returns when policy evaluation fails.

Comparing Errors

static func != (LAError, LAError) -> Bool

Returns a Boolean value indicating whether two values are not equal.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software