ilyon
ilyon

Reputation: 233

iOS 8 Touch ID broken

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

Upvotes: 2

Views: 312

Answers (1)

Ge Liu
Ge Liu

Reputation: 392

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.

Upvotes: 3

Related Questions