touch-id

Keychain error -25300 (errSecItemNotFound) when disabling and re-enabling Touch ID

霸气de小男生 提交于 2021-02-07 10:35:20
问题 I save the password to keychain with Touch ID flags: + (void)setPasscode:(NSString *)passcode { CFErrorRef error = NULL; SecAccessControlRef sacObject; sacObject = SecAccessControlCreateWithFlags(kCFAllocatorDefault, kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, kSecAccessControlUserPresence, &error); if(sacObject == NULL || error != NULL) { DLog(@"can't create sacObject: %@", error); return; } NSDictionary *attributes = @{ (__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword, (_

Keychain error -25300 (errSecItemNotFound) when disabling and re-enabling Touch ID

泄露秘密 提交于 2021-02-07 10:35:09
问题 I save the password to keychain with Touch ID flags: + (void)setPasscode:(NSString *)passcode { CFErrorRef error = NULL; SecAccessControlRef sacObject; sacObject = SecAccessControlCreateWithFlags(kCFAllocatorDefault, kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly, kSecAccessControlUserPresence, &error); if(sacObject == NULL || error != NULL) { DLog(@"can't create sacObject: %@", error); return; } NSDictionary *attributes = @{ (__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword, (_

iOS : Touch Id is not shown when AppDelegate's open url is invoked

假装没事ソ 提交于 2020-08-09 19:33:55
问题 My App supports opening documents like images, pdfs from other apps. Tocuh Id is implemented as shown below, it is requested when app comes to foreground NotificationCenter.default.addObserver(forName: .UIApplicationWillEnterForeground, object: nil, queue: .main) { (notification) in LAContext().evaluatePolicy( .deviceOwnerAuthenticationWithBiometrics, localizedReason: "Request Touch ID", reply: { [unowned self] (success, error) -> Void in if (success) { } else { } }) Now requesting for Touch

iOS : Touch Id is not shown when AppDelegate's open url is invoked

元气小坏坏 提交于 2020-08-09 19:32:25
问题 My App supports opening documents like images, pdfs from other apps. Tocuh Id is implemented as shown below, it is requested when app comes to foreground NotificationCenter.default.addObserver(forName: .UIApplicationWillEnterForeground, object: nil, queue: .main) { (notification) in LAContext().evaluatePolicy( .deviceOwnerAuthenticationWithBiometrics, localizedReason: "Request Touch ID", reply: { [unowned self] (success, error) -> Void in if (success) { } else { } }) Now requesting for Touch

iOS : Touch Id is not shown when AppDelegate's open url is invoked

落花浮王杯 提交于 2020-08-09 19:31:59
问题 My App supports opening documents like images, pdfs from other apps. Tocuh Id is implemented as shown below, it is requested when app comes to foreground NotificationCenter.default.addObserver(forName: .UIApplicationWillEnterForeground, object: nil, queue: .main) { (notification) in LAContext().evaluatePolicy( .deviceOwnerAuthenticationWithBiometrics, localizedReason: "Request Touch ID", reply: { [unowned self] (success, error) -> Void in if (success) { } else { } }) Now requesting for Touch

Multi user app login with Touch ID on iPad

拟墨画扇 提交于 2020-01-17 02:53:46
问题 Im looking into creating an iPad kiosk app to be used by multiple staff in store. I understand that IOS8 exposes Touch ID to apps - my question is, is it possible to use Touch ID to authenticate AND identify multiple users logging into an app? Not that it should matter too much but the app will be Hybrid/Cordova. 回答1: No you can not identify user, you can only authenticate a user. 来源: https://stackoverflow.com/questions/29695669/multi-user-app-login-with-touch-id-on-ipad

How to use system build-in passcode screen to authenticate my App when user clicks Enter Password

烈酒焚心 提交于 2020-01-13 12:07:11
问题 I'm integrating TouchID into my app, How can I use 'Enter passcode' option present system build-in passcode screen to authenticate my app.? Any one please explain how to handle case 'LAErrorUserFallback' in objective C. 回答1: You cannot do that. What you can do is use that option to show your own password screen. In your reply block you check the NSError object and switch off the fallback code. ....replyBlock:^(BOOL success, NSError *error) { if (error) { switch (error.code) case

Import LocalAuthentification.framework crashes on iOS 7.1

倾然丶 夕夏残阳落幕 提交于 2020-01-13 09:48:08
问题 Have a problem with usage of LocalAuthentication and support iOS 7.0 when I'm trying to import LocalAuthentication I'm getting crash if target iOS version is less than 8.0. I tried to mark LocalAuthentication.framework as optional in the build phases and check class availability by calling: var isTouchIDSupported: Bool { if let contextClass: AnyClass = NSClassFromString("LAContext") { return LAContext().canEvaluatePolicy(.DeviceOwnerAuthenticationWithBiometrics, error: nil) } return false }

How to display iPhone Pass Code Screen, when user Touch-ID Authentication UserFallback?

半腔热情 提交于 2020-01-13 07:18:39
问题 I want to handle UserFallback to show a pass code screen. I tried this tutorial, but when my UserFallback is called it will ask for Touch-ID again. If I use a wrong finger or Touch-ID did fail, then it's showing Apple's default Passcode screen. Please help me. 来源: https://stackoverflow.com/questions/31891577/how-to-display-iphone-pass-code-screen-when-user-touch-id-authentication-userfa

Getting Touch ID notification if passcode is used

ぃ、小莉子 提交于 2020-01-05 08:16:10
问题 I am using Touch ID in my app. If Touch ID fingerprint scanning fails three times in a row, I get a Application retry limit exceeded. error. If Touch ID fingerprint scanning fails another two times, I get a Biometry is locked out. error. After being locked out from biometry, you need to enter your passcode. Strangely, if your passcode is entered correctly then this does not lead to a success in the evaluatePolicy callback. Instead, you are then prompted to retry your biometry. How can I get a