Skip to content

Commit

Permalink
Merge pull request #3 from OutSystems/fix/RMET-324/auth-policy-update
Browse files Browse the repository at this point in the history
RMET-324 - TouchId Plugin (FaceId with password not working)
  • Loading branch information
CarlsCorrea authored Nov 13, 2020
2 parents 790e877 + b8733ae commit 0ae1749
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-touchid",
"version": "0.4.0-OS1",
"version": "0.4.0-OS2",
"author": "Lee Crossley <leee@hotmail.co.uk> (http://ilee.co.uk/)",
"description": "Cordova Plugin to leverage the iOS local authentication framework to allow in-app user authentication using Touch ID.",
"cordova": {
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-touchid" version="0.4.0-OS1">
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-touchid" version="0.4.0-OS2">
<name>Touch ID</name>
<author>Lee Crossley (http://ilee.co.uk/)</author>
<description>Cordova Plugin to leverage the iOS local authentication framework to allow in-app user authentication using Touch ID.</description>
Expand Down
8 changes: 4 additions & 4 deletions src/ios/TouchID.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ - (void) authenticate:(CDVInvokedUrlCommand*)command;
LAContext *laContext = [[LAContext alloc] init];
NSError *authError = nil;

if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError])
if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&authError])
{
[laContext evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:text reply:^(BOOL success, NSError *error)
[laContext evaluatePolicy:LAPolicyDeviceOwnerAuthentication localizedReason:text reply:^(BOOL success, NSError *error)
{
if (success)
{
Expand Down Expand Up @@ -87,7 +87,7 @@ - (void) checkSupport:(CDVInvokedUrlCommand*)command;
LAContext *laContext = [[LAContext alloc] init];
NSError *authError = nil;

if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:&authError])
if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:&authError])
{
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
}
Expand All @@ -114,7 +114,7 @@ - (void) checkBiometry:(CDVInvokedUrlCommand *)command;
//No biometry
int biometryType = -1;

if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:nil]) {
if ([laContext canEvaluatePolicy:LAPolicyDeviceOwnerAuthentication error:nil]) {
if (@available(iOS 11.0, *)) {
if (laContext.biometryType == LABiometryTypeFaceID) {
//FaceID
Expand Down

0 comments on commit 0ae1749

Please sign in to comment.