How to fallback to password authentication when Touch ID fails on iOS 8? -
i trying implement touch id authentication on app , want fall password if fails (or not available).
here code:
lacontext *ctx = [[lacontext alloc] init]; [ctx evaluatepolicy:lapolicydeviceownerauthenticationwithbiometrics localizedreason:@"authenticate access." reply:^(bool success, nserror *error) { if(success){ [...] }else if(error.code != laerroruserfallback){ [...] //error handler } }];
when auth touch id, success called. when can't auth after 3 touches, error handler called. no problem here. when tap enter password should display enter password screen, nothing happens. how display enter password screen?
you should first check see if touchid available calling lacontext's [canevaluatepolicy:error:]
method, return no
if touchid isn't available.
and laerroruserfallback your app's own password (authentication) scheme, not devices. more information can found here in related question.
Comments
Post a Comment