测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | 2017年9月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✓ |
由Igor Vasilenko维护。
在安全考虑方面,强烈建议启用 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 在 MIT 许可下发布。有关详细信息,请参阅 LICENSE。