Merge branch 'master' into feature/swift4.2

This commit is contained in:
Aliona 2018-10-15 12:50:35 +03:00 committed by GitHub
commit da15c52b99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 0 deletions

View File

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

View File

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

View File

@ -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() {}
}