iOS Guides | Samples

LocalAuthentication Namespace

The LocalAuthentication namespace provides support for TouchID.


The LocalAuthentication namespace, introduced in iOS 8, allows the app to require the user to authenticate with TouchID, as shown in the following example:

C# Example

btn.TouchUpInside += async(s,e) => {
    var ctxt = new LAContext();
    var error = new NSError();
    if(ctxt.CanEvaluatePolicy (LAPolicy.DeviceOwnerAuthenticationWithBiometrics, out error))
        var authenticated = await ctxt.EvaluatePolicyAsync(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, "Authenticate to confirm message");
        if (authenticated)


LAAccessControlOperationEnumerates access control operations for the LAContext.EvaluateAccessControl method.
LAContextThe context in which authentication policies are evaluated.
LAContextReplyHandlerSignature for a function to be invoked in response to a LAContext.EvaluatePolicy invocation.
LACredentialTypeEnumerates local authentication credential types.
LAPolicyAuthentication policies.
LAStatusStatus and error codes returned by methods in LocalAuthentication.
LAStatusExtensionsExtension methods for the LocalAuthentication.LAStatus enumeration.