<!--
{
  "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/canEvaluatePolicy(_:error:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Local Authentication"
    ],
    "preciseIdentifier" : "c:objc(cs)LAContext(im)canEvaluatePolicy:error:"
  },
  "title" : "canEvaluatePolicy(_:error:)"
}
-->

# canEvaluatePolicy(_:error:)

Assesses whether authentication can proceed for a given policy.

```
func canEvaluatePolicy(_ policy: LAPolicy, error: NSErrorPointer) -> Bool
```

## Parameters

`policy`

The policy to evaluate. For possible values, see [`LAPolicy`](/documentation/LocalAuthentication/LAPolicy).

`error`

If the method fails, it uses this parameter to return an error detailing what went wrong. See [`LAError.Code`](/documentation/LocalAuthentication/LAError-swift.struct/Code) for possible error codes.

    Specify     `nil`     for this parameter to ignore any errors.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the policy can be evaluated, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Some policies impose requirements that must be met before authentication can proceed. For example, a policy that requires biometrics can’t authenticate if Touch ID or Face ID is disabled. This method tests all the prerequisites for a given policy.

Don’t store the return value from this method because it might change as a result of changes in the system. For example, a user might disable Touch ID after you call this method.

> Important:
> Don’t call this method in the reply block of the ``doc://com.apple.localauthentication/documentation/LocalAuthentication/LAContext/evaluatePolicy(_:localizedReason:reply:)`` method because that might lead to deadlock.

---

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)