diff --git a/CHANGELOG.md b/CHANGELOG.md index 125494b..a207bfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog +### 0.3.4 + +- **Add**: `isFaceIdSupported` variable to `BiometricsService` to distinguish FaceID from TouchID. + ### 0.3.3 - **Add**: Public `init` to `BiometricsService` diff --git a/LeadKitAdditions.podspec b/LeadKitAdditions.podspec index 60dba35..611630a 100644 --- a/LeadKitAdditions.podspec +++ b/LeadKitAdditions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LeadKitAdditions" - s.version = "0.3.3" + s.version = "0.3.4" 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/Services/BiometricsService.swift b/Sources/Services/BiometricsService.swift index 31e1030..37ee7f0 100644 --- a/Sources/Services/BiometricsService.swift +++ b/Sources/Services/BiometricsService.swift @@ -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