Instantly share code, notes, and snippets.

Embed
What would you like to do?
...
self.authenticationContext = LAContext()
var errorPolicy: NSError?
if self.authenticationContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: &errorPolicy)
{
...
}
else
{
let message = errorPolicy?.localizedDescription ?? NSLocalizedString("AUTHENTICATION_POLICY_ERROR_MESSAGE", comment: "")
print(message)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment