feat: add support for unlocking with Apple Watch (#36935)
This commit is contained in:
parent
c303135b02
commit
1486cbdf64
1 changed files with 4 additions and 3 deletions
|
@ -425,9 +425,10 @@ std::string SystemPreferences::GetSystemColor(gin_helper::ErrorThrower thrower,
|
|||
|
||||
bool SystemPreferences::CanPromptTouchID() {
|
||||
base::scoped_nsobject<LAContext> context([[LAContext alloc] init]);
|
||||
if (![context
|
||||
canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics
|
||||
error:nil])
|
||||
LAPolicy auth_policy = LAPolicyDeviceOwnerAuthenticationWithBiometrics;
|
||||
if (@available(macOS 10.15, *))
|
||||
auth_policy = LAPolicyDeviceOwnerAuthenticationWithBiometricsOrWatch;
|
||||
if (![context canEvaluatePolicy:auth_policy error:nil])
|
||||
return false;
|
||||
if (@available(macOS 10.13.2, *))
|
||||
return [context biometryType] == LABiometryTypeTouchID;
|
||||
|
|
Loading…
Reference in a new issue