From a4ff6a667ad6269176e272c53dc060d3a583bda1 Mon Sep 17 00:00:00 2001 From: Iurii Date: Mon, 21 Jan 2019 05:44:07 +0300 Subject: [PATCH] recreate the context --- Sources/Services/BiometricsService.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/Services/BiometricsService.swift b/Sources/Services/BiometricsService.swift index 926eaeb..83fa2c6 100644 --- a/Sources/Services/BiometricsService.swift +++ b/Sources/Services/BiometricsService.swift @@ -75,7 +75,8 @@ public final class BiometricsService { /** Initiates system biometrics authentication process. - Once evaluated, will return success until the context is deallocated or invalidated. + Once evaluated, will return success until the context is deallocated. + Call "clear" to use a new context instance. - parameters: - description: prompt on the system alert @@ -97,10 +98,8 @@ public final class BiometricsService { } } - /// This method allows invalidating the context manually while it is in scope. - /// Invalidation terminates any existing policy evaluation and the respective call will - /// fail with LAErrorAppCancel. - public func invalidate() { + /// Replace old instance of the context with the new one + public func clear() { laContext = LAContext() }