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

1

16

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!

Craving answered 18/8, 2017 at 18:55 Comment(0)
C
1

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.

Craving answered 29/8, 2017 at 11:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.