Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Enter Password and Cancel button from Touch ID alert view

I got stuck that don't want Enter Password in the Alert of thumb impression

[context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"UNLOCK_ACCESS_TO_LOCKED_FEATURE", nil) reply:          ^(BOOL success, NSError *authenticationError)          {              if (success)              {                   msg =[NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_SUCCESS", nil)];              }              else              {                  msg = [NSString stringWithFormat:NSLocalizedString(@"EVALUATE_POLICY_WITH_ERROR", nil), authenticationError.localizedDescription];              }          }];      } 
like image 539
Rahul Gupta Avatar asked Jan 23 '15 05:01

Rahul Gupta


People also ask

How do I disable Touch ID?

How to disable Touch ID on your iPhone or iPad. Go to Settings > Touch ID & Passcode. Turn off one or more of the options.

How to use Touch ID on iPhone?

Tap Settings > Touch ID & Passcode, then enter your passcode. Tap Add a Fingerprint and hold your device as you normally would when touching the Touch ID sensor. Touch the Touch ID sensor with your finger—but don't press—so the device can begin recognizing your fingerprint.

How do I turn off Touch ID for certain apps?

You can choose to enable or disable Touch ID at any time through the 'Profile' menu (the icon in the top right corner on the account list screen) within the app. You will always have the option of entering your passcode for our app, even if Touch ID is activated.

What is LAContext?

LAContext(IntPtr) A constructor used when creating managed representations of unmanaged objects; Called by the runtime. LAContext(NSObjectFlag) Constructor to call on derived classes to skip initialization and merely allocate the object.


1 Answers

To hide the button "Enter password", you need to set localizedFallbackTitle to an empty string.

//... LAContext *context = [[LAContext alloc] init];  // Hide "Enter Password" button context.localizedFallbackTitle = @"";  // show the authentication UI //... 

About the "Cancel" button I don't think that it is possible to remove it.

Hope that it will be helpful.

like image 121
youssman Avatar answered Oct 06 '22 02:10

youssman