1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 16:53:26 +00:00

support for faceid labels

This commit is contained in:
Kyle Spearrin
2017-11-29 15:47:43 -05:00
parent 898b76a549
commit 14540b4cc0
11 changed files with 79 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
using Bit.App.Abstractions;
using Foundation;
using LocalAuthentication;
using UIKit;
namespace Bit.iOS.Core.Services
@@ -25,5 +27,19 @@ namespace Bit.iOS.Core.Services
public bool NfcEnabled => false;
public bool HasCamera => true;
public bool AutofillServiceSupported => false;
public bool HasFaceIdSupport
{
get
{
if(Version < 11)
{
return false;
}
var context = new LAContext();
return context.CanEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, out NSError e) &&
context.BiometryType == LABiometryType.TypeFaceId;
}
}
}
}