There are 2 issues when using allowableReuseDuration:
- value 0 is not equal to disabling the property;
- only one instance of LAContext is uses.
It can get trouble for example in situation when I set allowableReuseDuration and start scanning a lot of times - each next scanning will use the first result.
Could you change the logic of allowableReuseDuration?
- remove optional type (from TimeInterval? to TimeInterval);
- add the default value 0 to allowableReuseDuration;
- remove didSet handler from allowableReuseDuration;
- set the touchIDAuthenticationAllowableReuseDuration property right after LAContext creation.
For example
var allowableReuseDuration: TimeInterval = 0
// context
let context = LAContext()
context.touchIDAuthenticationAllowableReuseDuration = allowableReuseDuration
There are 2 issues when using allowableReuseDuration:
It can get trouble for example in situation when I set allowableReuseDuration and start scanning a lot of times - each next scanning will use the first result.
Could you change the logic of allowableReuseDuration?
For example