diff --git a/CHANGELOG.md b/CHANGELOG.md index e3c0422..6e4cae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index 863d88e..4a7ae53 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -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" diff --git a/Sources/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift b/Sources/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift index a41fc6b..d0a1d29 100644 --- a/Sources/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift +++ b/Sources/Controllers/PassCode/ViewModel/BasePassCodeViewModel.swift @@ -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 {