-
-
Save fitomad/10c5f09f3548fbbb3b71e6967a19cea9 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
... | |
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