diff --git a/CHANGELOG.md b/CHANGELOG.md index 818dc8b..4231b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.2.9 +- **Add**: `evaluatedPolicyDomainState` to `BiometricsService`. + ### 0.2.8 - **Update**: `validationResult` of `BasePassCodeViewModel` renamed to `validationResultDriver` and becomes public. - **Remove**: `MaskFieldTextProxy`. diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index ed51da2..ac1d1bf 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKitAdditions" - s.version = "0.2.8" + s.version = "0.2.9" s.summary = "iOS framework with a bunch of tools for rapid development" s.homepage = "https://github.com/TouchInstinct/LeadKitAdditions" s.license = "Apache License, Version 2.0" diff --git a/Sources/Services/BiometricsService.swift b/Sources/Services/BiometricsService.swift index 38af4da..504045f 100644 --- a/Sources/Services/BiometricsService.swift +++ b/Sources/Services/BiometricsService.swift @@ -29,6 +29,13 @@ public final class BiometricsService { private lazy var laContext = LAContext() + /// Returns current domain state + public var evaluatedPolicyDomainState: Data? { + // We need to call canEvaluatePolicy function for evaluatedPolicyDomainState to be updated + _ = canAuthenticateWithBiometrics + return laContext.evaluatedPolicyDomainState + } + /// Indicates is it possible to authenticate on this device via touch id public var canAuthenticateWithBiometrics: Bool { return laContext.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: nil)