Is there any way to disable the Touch ID prompt (UIAlertview)?

后端 未结 2 1416
死守一世寂寞
死守一世寂寞 2020-12-17 06:36

Trying to Integrate TouchId in my application, and i was successful too.

The Question is Can we customize the Default TouchID UIalertview ? Can we Disable it?

相关标签:
2条回答
  • 2020-12-17 07:25

    No, you cannot. As Popeye said in a comment, the system controls that prompt, not your app – you simply request that the system display it for you. This is due to obvious security concerns.

    For example, what if you initiated a $100 in-app purchase, but changed the prompt to say, "Place your thumb on the home button to start the game!" Clearly that would not go over well.

    0 讨论(0)
  • 2020-12-17 07:26

    You can customized it the message in the alert can be set with the localizedReason parameter - (void)evaluatePolicy:(LAPolicy)policy localizedReason:(NSString *)localizedReason reply:(void (^)(BOOL success, NSError *error))reply

    You can also set the action button (default is "Enter Password") with

    LAContext *context = [[LAContext alloc] init]; context.localizedFallbackTitle = [your message]

    The "localizedFallbackTitle" is not in the docs but part of the LAContext .h file

    0 讨论(0)
提交回复
热议问题