the following code show alert while authenticating. want authentication should happen in background, when unlock iphone's passcode lock using touch id.
func touchidcheck(){ let authcontext:lacontext=lacontext() var error:nserror? if authcontext.canevaluatepolicy(lapolicy.deviceownerauthenticationwithbiometrics, error: &error){ authcontext.evaluatepolicy(lapolicy.deviceownerauthenticationwithbiometrics, localizedreason: "testing", reply: { (wassuccessful:bool, error:nserror?) in if wassuccessful{ print("yes")} else { print("no") } } ) } }
Comments
Post a Comment