Questions tagged [lacontext]

LAContext allows to request authentication from users through passphrases or biometrics. It is part of Apple's Local Authentication framework.

LAContext allows to request authentication from users through passphrases or biometrics. It is part of Apple's Local Authentication framework.

24 questions
27
votes
7 answers

How to remove Enter Password and Cancel button from Touch ID alert view

I got stuck that don't want Enter Password in the Alert of thumb impression [context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:NSLocalizedString(@"UNLOCK_ACCESS_TO_LOCKED_FEATURE", nil) reply: ^(BOOL…
Rahul Gupta
  • 501
  • 1
  • 7
  • 15
23
votes
4 answers

LABiometryType in iOS11 always return None

No matter what settings is configured in Device's passcode and touchId settings , LAContext always returns none . It is just throwing me a warning not the exception. Its only working in XCode 9.1 Beta in iOS11.1 beta as suggested :(
guhan0
  • 666
  • 6
  • 19
16
votes
1 answer

How does the life-time of an LAContext instance in iOS 8 behave?

I am wondering how the lifetime of a LAContext instance from the LocalAuthentication framework looks like in iOS 8. In iOS 9 and later, there is the invalidate method to manually invalidate the current context. If I am not using that method, the…
Hans Knöchel
  • 11,422
  • 8
  • 28
  • 49
6
votes
2 answers

Touch ID: Biometry is locked out. Code=-8

Im using Touch id to identify iPhone users in my app, when is use canEvaluatePolicy: LAPolicyDeviceOwnerAuthenticationWithBiometrics to evaluate if the user is eligible for using Touch id, but after many failed tries even if the user is eligible for…
Mutawe
  • 6,464
  • 3
  • 47
  • 90
3
votes
2 answers

What does [unowned self] mean and what are the benefits?

I´m trying to integrate Face/Touch ID Login and I saw [unowned self] in Apple's documentation, inside a closure. What is that and what are the benefits? Example code: let context = LAContext() var error: NSError? if…
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96
3
votes
2 answers

LAContext UI on simulator

Does anybody knows what is UI presented on Simulator when you call self._authContext = LAContext() if self._authContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: &authError) { …
alexey.metelkin
  • 1,309
  • 1
  • 11
  • 20
2
votes
1 answer

iOS - What does the following LAContext error logs on iOS mean?

I keep getting the following log in my console. [Client,LAContext] LAContext[5174:1692] will keep returning Error Domain=com.apple.LocalAuthentication Code=-10 "Invalidated due to exceeded number of allocated contexts."…
AjinkyaSharma
  • 1,870
  • 1
  • 16
  • 26
2
votes
3 answers

How to change StatusBar Style for LAContext

i have implemented View controller-based status bar appearance to YES in my application. I have implemeted biometric authentication in my application. but the issue is my UIViewController has .lightContent and when biometric dialog presents for…
Kuldeep
  • 4,466
  • 8
  • 32
  • 59
2
votes
2 answers

Unable to get error code for LAErrorAuthenticationFailed in IOS FaceID

Im trying to create an app with Face id feature. But when I try to handle the error codes, i can only catch the LAErrorUserCancel. I was unable to catch other error codes such as LAErrorAuthenticationFailed. [context…
2
votes
1 answer

how can I leverage Authentication With Biometrics to authenticate a user in web View?

I have a web application that I load in native app with WKWebView. The first navigation is login screen and I'm looking for a way to authenticate the user with ios bio-metrics. Please let me know if you can help me.
Ali Kashanchi
  • 8,620
  • 3
  • 14
  • 11
1
vote
1 answer

LAContext evaluatePolicy not showing TouchID prompt

func authenticateBiometry(completion: @escaping ErrorHandler) { context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: " ") { success, error in guard let error = error else { if success { …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
1
vote
2 answers

Biometrics prompt not appearing after first successful authentication

I have a working example below, but a bit of an explanation. I want the user to be able to toggle the option to unlock their app data with biometrics (or not if preferred). If they activate the toggle, once the app resigns to background or has been…
markb
  • 1,100
  • 1
  • 15
  • 40
1
vote
1 answer

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

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:…
Rajesh Rs
  • 1,301
  • 5
  • 24
  • 48
1
vote
0 answers

how unique/trustworthy is the int generated by LAContext.hash()

I'm trying to use biometrics to login to a webView application. I came across LAContext.hash() which you can run in your evaluatePolicy method. It generates a 10 digit Int. I tried it multiple times and it always returns the same number. Any of you…
John Lock
  • 11
  • 1
1
vote
1 answer

Different fingerprints using Touch ID in ios

I am working on an application which uses Touch ID. I have integrated the Touch ID into the app to authenticate the user to access some app elements and it works fine. LAContext *context = [[LAContext alloc] init]; NSError *error = nil; if…
remyr3my
  • 768
  • 1
  • 6
  • 19
1
2