From 5494db6ae94d7731463396581ff4bd71307a522a Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Thu, 5 Apr 2018 13:22:57 +0300 Subject: [PATCH 1/2] Biometrics start and end notifications added --- .../PassCode/ViewModel/BasePassCodeViewModel.swift | 8 ++++++++ 1 file changed, 8 insertions(+) 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 { From 4bd3bc7b5f99054c2a457a911772f74ed87bdbb0 Mon Sep 17 00:00:00 2001 From: Alexey Gerasimov Date: Thu, 5 Apr 2018 13:25:43 +0300 Subject: [PATCH 2/2] Changelog and version --- CHANGELOG.md | 4 ++++ LeadKitAdditions.podspec | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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"