Merge pull request #42 from TouchInstinct/feature/biometrics
Feature/biometrics
This commit is contained in:
commit
c9697df89e
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
### 0.2.5
|
||||
|
||||
- **Add**: Methods to notify when biometrics auth begins and ends.
|
||||
|
||||
### 0.2.4
|
||||
- **Add**: `PinLayout` dependency.
|
||||
- **Add**: `PinLayoutTableViewCell`, `SeparatorTableViewCell` and `LabelTableViewCell` powered by PinLayout.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "LeadKitAdditions"
|
||||
s.version = "0.2.4"
|
||||
s.version = "0.2.5"
|
||||
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"
|
||||
|
|
|
|||
|
|
@ -101,9 +101,11 @@ open class BasePassCodeViewModel: BaseViewModel {
|
|||
}
|
||||
|
||||
public func authenticateUsingBiometrics(with description: String, fallback: String?, cancel: String?) {
|
||||
biometricsAuthBegins()
|
||||
biometricsService.authenticateWithBiometrics(with: description,
|
||||
fallback: fallback,
|
||||
cancel: cancel) { [weak self] success, error in
|
||||
self?.biometricsAuthEnds()
|
||||
if success {
|
||||
self?.authSucceed(.touchId)
|
||||
} else {
|
||||
|
|
@ -142,6 +144,12 @@ open class BasePassCodeViewModel: BaseViewModel {
|
|||
assertionFailure("You should override this method: activateBiometricsForUser()")
|
||||
}
|
||||
|
||||
/// Notify before system alert with biometrics
|
||||
open func biometricsAuthBegins() {}
|
||||
|
||||
/// Notify after system alert with biometrics
|
||||
open func biometricsAuthEnds() {}
|
||||
|
||||
}
|
||||
|
||||
private extension BasePassCodeViewModel {
|
||||
|
|
|
|||
Loading…
Reference in New Issue