TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✓ |
Maintained by Igor Vasilenko.
In security cosiderations strongly recommented enable forceThrowsOnChangedDomainState
let biometricAuth = BiometricAuth(forceThrowsOnChangedDomainState: true)
do {
try self.biometricAuth.isAvailable()
} catch let error as BiometricAuthError {
print(error.localizedDescription)
} catch {
print("Something went wrong")
}
let feature = "Passcode Screen Auth"
do {
try self.biometricAuth.enableAuthentication(forFeature: feature)
} catch let error as BiometricAuthError {
print(error.localizedDescription)
} catch {
print("Something went wrong")
}
self.biometricAuth.requestAuthentication(forFeature: feature, reason: "Reason", completion: { (result, error) in
if result {
print("Success")
}
})
BiometricAuth is released under the MIT license. See LICENSE for details.