Merge pull request #46 from TouchInstinct/feature/domain_state_property

Feature/domain state property
This commit is contained in:
Pavel 2018-05-24 12:27:43 +03:00 committed by GitHub
commit 618ac578c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -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`.

View File

@ -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"

View File

@ -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)