Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 LAContext instance will still be active and store the state of the evaluation. One could say that I could simply nil/release it after usage, but I need the instance across the functionality to do additional things like validation of the availability of it and to enable the invalidate method at a different point of the VC. Does this also happen on iOS 8? I would ask Apple, because the docs do not clarify this, but I wanted to reach out for some more thoughts beforehand.

Thanks everyone!

like image 444
Hans Knöchel Avatar asked Aug 18 '17 18:08

Hans Knöchel


1 Answers

Answer from Apple: On iOS 8, it behaves like on iOS 9 and later without calling invalidate, so in order to terminate it after using it, the developer can nil it and the instance will be released.

like image 177
Hans Knöchel Avatar answered Oct 18 '22 21:10

Hans Knöchel