Face ID close application

RodolfoRodolfo Member

I have an application that uses face ID to authenticate, it was working perfectly, until I updated the iphone x to the latest version 11.4.1, the application now closes without giving any error

this is the code

public void AuthenticateUsingFingerprint (string companyId, string username, string password) {
        LAContext context = new LAContext ();
        if (context.CanEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, out var AutError))
        {
            BiometrivType = context.BiometryType == LABiometryType.TouchId ? "fingerprint" : "face";
            var message = NSBundle.MainBundle.LocalizedString(string.Format("Authenticate using your {0}",BiometrivType), "");
            var handler = new LAContextReplyHandler((success, error) =>
            {
                this.InvokeOnMainThread(() =>
                {
                    if (success)
                    {
                        LogginUserWithFinger(companyId, username, password);
                    }
                    else
                    {
                        Console.WriteLine("Error  ="+error.Description);
                    }
                });
            });

                context.EvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, message, handler);  // in this line close the application

        }
}

someone has some idea that is happening, thanks for the help

Answers

Sign In or Register to comment.