touch-id

TouchID error Code: -1004 NSLocalizedDescription: User interaction is required

孤人 提交于 2019-12-10 10:59:46
问题 I am working on the app that uses touch ID for login. It should ask for touch ID only at first launch (i.e. I am not asking for touch ID auth when app enters foreground from background). Here is what I do to show touchID: AppDelegate.swift: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let loginViewController = storyboard.instantiateViewControllerWithIdentifier("login") as! LoginViewController rootViewController =

TouchID crash on some iPhone 5S devices

我的梦境 提交于 2019-12-10 02:30:10
问题 My app crashes on some iPhone 5S device (only some) with the error: Fatal Exception: NSInternalInconsistencyException Unexpected error: Error Domain=NSCocoaErrorDomain Code=4097 "The operation couldn’t be completed. (Cocoa error 4097.)" (connection to service named com.apple.CoreAuthentication.daemon) UserInfo=0x174461dc0 {NSDebugDescription=connection to service named com.apple.CoreAuthentication.daemon} The line which breaks the app is the following: LAContext().canEvaluatePolicy(LAPolicy

iOS prefs url scheme for touch id & passcode settings

半腔热情 提交于 2019-12-10 02:29:08
问题 there are a lot of lists with prefs urls for the iOS settings app, used to open a specific site in the settings app (e.g. https://stackoverflow.com/a/8246814/4266294). Unfortunately, I cannot find the url in order to open the touch id & passcode settings. Does anybody know the url scheme for this? 回答1: if let url = URL(string: "App-Prefs:root=TOUCHID_PASSCODE") { UIApplication.shared.openURL(url) } this works on IOS 10.2. However I'm not sure if apple rejects this or not. Has anyone had any

How to use Touch ID sensor in iOS 8

梦想与她 提交于 2019-12-09 17:02:54
问题 One of the most things I was excited about iOS 8 was the ability to use fingerprint sensors on the iPhone 5s and later. Unfortunately I cannot find out what is the required framework for that, nor how I can make authentication. Please help me with: What framework required for using Touch ID? How to use its methods and how to authenticate the user? A code sample would be much appreciated. 回答1: More complete snippet, swift style: func authenticateUser() { // Get the local authentication context

iOS - Face ID biometric integration

纵然是瞬间 提交于 2019-12-08 19:08:31
问题 I've integrated/implemented Face ID (Local Authentication) authentication for my app and everything works fine, except Face ID prompt Alert window interface. It shows, a rounded square with a light gray background and the title "Face ID" . What should need to set for blank area exact above title? Is that space for face id icon? if yes then how can I set it? I've tried everything in LAContext and LAPolicy. Look at this snapshot: Here is my code: let laContext = LAContext() var error: NSError?

swift - touchID takes long time to load

廉价感情. 提交于 2019-12-08 04:14:12
问题 I'm working on integrating touchID into my application. The process was fairly simple, but even just using my dummy data, it takes about 5 seconds after it authenticated my fingerprint, before it performs it's task. Here's my code: func requestFingerprintAuthentication() { let context = LAContext() var authError: NSError? let authenticationReason: String = "Login" if context.canEvaluatePolicy(LAPolicy.DeviceOwnerAuthenticationWithBiometrics, error: &authError) { context.evaluatePolicy

TouchID error Code: -1004 NSLocalizedDescription: User interaction is required

自古美人都是妖i 提交于 2019-12-06 14:00:23
I am working on the app that uses touch ID for login. It should ask for touch ID only at first launch (i.e. I am not asking for touch ID auth when app enters foreground from background). Here is what I do to show touchID: AppDelegate.swift: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let loginViewController = storyboard.instantiateViewControllerWithIdentifier("login") as! LoginViewController rootViewController = loginViewController let navigationController = UINavigationController(rootViewController:

How to check TouchID enable or not

不羁的心 提交于 2019-12-05 18:36:27
Is there any way to check my application is enable with TouchID, How can i check if my application is enable with TouchID, For example : DropBox have capability to enable figure print sensor enable. now is there any method to check if my application showing TouchID screen based on touchid enable. According you use Objective-C First, add method to check iOS Version TouchID needs iOS8+ to work #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame) #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice]

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

我是研究僧i 提交于 2019-12-05 17:15:59
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. 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 LAErrorUserFallback: Now here you can do whatever your app wants to do for app specific, not device specific,

Is there any way to use apple's Touch ID (fingerprint scanner) on iOS Simulator?

℡╲_俬逩灬. 提交于 2019-12-05 10:04:51
问题 I am working on an app which would require Touch ID Authentication, so is there any way i can use Touch ID (fingerprint scanner) in the simulator ? Also, please do share some kind of example code for using LocalAuthentication framework. 回答1: As of Xcode 7 the Simulator supports 'touchID'. Answer below contains further info. As of the latest beta (6) there is no way to simulate a fingerprint scan on the simulator. To be honest I doubt this will be included even in later betas. You will need to