<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "LocalAuthentication",
  "identifier" : "/documentation/LocalAuthentication/LAContext",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Local Authentication"
    ],
    "preciseIdentifier" : "c:objc(cs)LAContext"
  },
  "title" : "LAContext"
}
-->

# LAContext

A mechanism for evaluating authentication policies and access controls.

```
class LAContext
```

## Overview

You use an authentication context to evaluate the user’s identity, either with biometrics like Touch ID or Face ID, or by supplying the device passcode. The context handles user interaction, and also interfaces to the Secure Enclave, the underlying hardware element that manages biometric data. You create and configure the context, and ask it to carry out the authentication. You then receive an asynchronous callback, which provides an indication of authentication success or failure, and an error instance that explains the reason for a failure, if any.

> Important:
> Include the [NSFaceIDUsageDescription](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW75) key in your app’s `Info.plist` file if your app allows biometric authentication. Otherwise, authorization requests may fail.

## Topics

### Checking availability

[`canEvaluatePolicy(_:error:)`](/documentation/LocalAuthentication/LAContext/canEvaluatePolicy(_:error:))

Assesses whether authentication can proceed for a given policy.

[`LAPolicy`](/documentation/LocalAuthentication/LAPolicy)

The set of available local authentication policies.

[`biometryType`](/documentation/LocalAuthentication/LAContext/biometryType)

The type of biometric authentication supported by the device.

[`LABiometryType`](/documentation/LocalAuthentication/LABiometryType)

The set of available biometric authentication types.

### Evaluating authentication policies

[`evaluatePolicy(_:localizedReason:reply:)`](/documentation/LocalAuthentication/LAContext/evaluatePolicy(_:localizedReason:reply:))

Evaluates the specified policy.

[`evaluatedPolicyDomainState`](/documentation/LocalAuthentication/LAContext/evaluatedPolicyDomainState)

The current state of the evaluated policy domain.

[`maxBiometryFailures`](/documentation/LocalAuthentication/LAContext/maxBiometryFailures)

The number of biometric authentication failures after which the context falls back to another mechanism.

### Evaluating access controls

[`evaluateAccessControl(_:operation:localizedReason:reply:)`](/documentation/LocalAuthentication/LAContext/evaluateAccessControl(_:operation:localizedReason:reply:))

Evaluates an access control for a given operation.

[`LAAccessControlOperation`](/documentation/LocalAuthentication/LAAccessControlOperation)

Operations to be evaluated for access control.

[`interactionNotAllowed`](/documentation/LocalAuthentication/LAContext/interactionNotAllowed)

A Boolean value indicating whether authentication can be interactive.

### Customizing authentication prompts

[`localizedReason`](/documentation/LocalAuthentication/LAContext/localizedReason)

The localized explanation for authentication shown in the dialog presented to the user.

[`localizedFallbackTitle`](/documentation/LocalAuthentication/LAContext/localizedFallbackTitle)

The localized title for the fallback button in the dialog presented to the user during authentication.

[`localizedCancelTitle`](/documentation/LocalAuthentication/LAContext/localizedCancelTitle)

The localized title for the cancel button in the dialog presented to the user during authentication.

### Reusing device unlock state

[`touchIDAuthenticationAllowableReuseDuration`](/documentation/LocalAuthentication/LAContext/touchIDAuthenticationAllowableReuseDuration)

The duration for which Touch ID authentication reuse is allowable.

[`LATouchIDAuthenticationMaximumAllowableReuseDuration`](/documentation/LocalAuthentication/LATouchIDAuthenticationMaximumAllowableReuseDuration)

The maximum allowable reuse duration.

### Managing credentials

[`setCredential(_:type:)`](/documentation/LocalAuthentication/LAContext/setCredential(_:type:))

Sets an application-provided credential to be used when evaluating authentication.

[`isCredentialSet(_:)`](/documentation/LocalAuthentication/LAContext/isCredentialSet(_:))

Returns a Boolean value indicating whether the specified credential type is set.

[`LACredentialType`](/documentation/LocalAuthentication/LACredentialType)

The types of credentials to be used for authentication.

### Invalidating the authentication context

[`invalidate()`](/documentation/LocalAuthentication/LAContext/invalidate())

Invalidates the authentication context.

### Monitoring context changes



---

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)