Merge branch 'master' into feature/swift4.2
This commit is contained in:
commit
da15c52b99
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -1,5 +1,18 @@
|
|||
# Changelog
|
||||
|
||||
|
||||
### 0.3.4
|
||||
|
||||
- **Add**: `isFaceIdSupported` variable to `BiometricsService` to distinguish FaceID from TouchID.
|
||||
|
||||
### 0.3.3
|
||||
|
||||
- **Add**: Public `init` to `BiometricsService`
|
||||
|
||||
### 0.3.2
|
||||
|
||||
- **Add**: functions to `BasePassCodeViewController` to make `fakeTextField` become and resign first responder
|
||||
|
||||
### 0.3.1
|
||||
- **Add**: `PinLayoutTableViewCell` and `SeparatorTableViewCell` to `Core-iOS-Extension`.
|
||||
|
||||
|
|
|
|||
|
|
@ -248,6 +248,18 @@ open class BasePassCodeViewController: UIViewController, ConfigurableController
|
|||
titleLabel?.attributedText = actionTitle(for: passCodeControllerState)
|
||||
}
|
||||
|
||||
// MARK: - Public functions
|
||||
|
||||
/// Make fakeTextField become first responder
|
||||
public func enableInput() {
|
||||
fakeTextField.becomeFirstResponder()
|
||||
}
|
||||
|
||||
/// Make fakeTextField resign first responder
|
||||
public func disableInput() {
|
||||
fakeTextField.resignFirstResponder()
|
||||
}
|
||||
|
||||
// MARK: - ConfigurableController
|
||||
|
||||
open func bindViews() {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,15 @@ public final class BiometricsService {
|
|||
|
||||
private lazy var laContext = LAContext()
|
||||
|
||||
/// Returns true if user can authenticate via faceID
|
||||
public var isFaceIdSupported: Bool {
|
||||
if #available(iOS 11.0, *) {
|
||||
return canAuthenticateWithBiometrics && laContext.biometryType == .faceID
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns current domain state
|
||||
public var evaluatedPolicyDomainState: Data? {
|
||||
// We need to call canEvaluatePolicy function for evaluatedPolicyDomainState to be updated
|
||||
|
|
@ -64,4 +73,6 @@ public final class BiometricsService {
|
|||
}
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue