Skip to content

Instantly share code, notes, and snippets.

@vishw33
Created May 21, 2018 07:41
Show Gist options
  • Select an option

  • Save vishw33/870506f123ae7cf57695da7eb487b4ba to your computer and use it in GitHub Desktop.

Select an option

Save vishw33/870506f123ae7cf57695da7eb487b4ba to your computer and use it in GitHub Desktop.
static func isDeviceSupportedforAuth () -> Bool
{
let context = LAContext()
var policy: LAPolicy?
policy = .deviceOwnerAuthentication
var err: NSError?
guard context.canEvaluatePolicy(policy!, error: &err) else
{
return false
}
return true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment