Last active
December 19, 2017 18:55
-
-
Save akultomar17/e7d16b49a239835e18a6474f883e5bb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func evaulateTocuhIdAuthenticity(context: LAContext) { | |
guard let lastAccessedUserName = UserDefaults.standard.object(forKey: "lastAccessedUserName") as? String else { return } | |
context.evaluatePolicy(LAPolicy.deviceOwnerAuthentication, localizedReason: lastAccessedUserName) { (authSuccessful, authError) in | |
if authSuccessful { | |
} else { | |
if let error = authError as? LAError { | |
showError(error: error) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment