2

When using the touch id authentication password, click the home button then on backgrounding the app, and bringing it to the foreground, keep your finger on the home button, the program will verify the password by entering the program, there will be a delay of a touch id interface, when I Click to cancel, the program will be stuck like a picture like this, where there is a problem? Thank you very much for your help!

![Error screenshot] https://www.dropbox.com/s/rg2bx5ob1ehzc54/86.pic.jpg?dl=0

ilyon
  • 233
  • 2
  • 13
  • Re-work the description of the chain of events to more clearly define the steps to re-create the problem. Possibly a numbered list or one sentence per step. Then submit the bug to Apple at http://bugreporter.apple.com – zaph Oct 20 '14 at 12:29
  • See http://stackoverflow.com/questions/26463196/touch-id-causing-app-to-become-non-responsive/26730860#26730860. – Aviram Nov 04 '14 at 08:52

1 Answers1

3

This issue happens when you use Touch ID immediately after the app launches and change current view controller or window in the reply block of evaluatePolicy:localizedReason:reply:.

Just Wait a while after the availablility check(canEvaluatePolicy:error:) of Touch ID.

Put evaluatePolicy:localizedReason:reply: inside a dispatch_after() like this:

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, .5f * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
    ...
});

I've made a sample project as well as a solution here:

https://github.com/RungeZhai/TouchIDIssue

Aviram's answer works as well.

Ge Liu
  • 382
  • 7
  • 14
  • Please don't link to another site only (as an answer). You gave the exact answer on another question tagged `touch-id`. This is *not* how SO works. Please be specific about the solution to the given problem. – HAS Nov 24 '14 at 07:25