Merge pull request #46 from TouchInstinct/feature/domain_state_property
Feature/domain state property
This commit is contained in:
commit
618ac578c7
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue