Skip to content

Commit

Permalink
Merge pull request #52 from squio/master
Browse files Browse the repository at this point in the history
Remove label 'defaultValue' for Swift 5 compat
  • Loading branch information
epicshaggy committed Apr 27, 2022
2 parents 76e1156 + 1708727 commit c3062a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/Plugin/Plugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class NativeBiometric: CAPPlugin {

obj["isAvailable"] = false

let useFallback = call.getBool("useFallback", defaultValue: false)
let useFallback = call.getBool("useFallback", false)
let policy = useFallback ? LAPolicy.deviceOwnerAuthentication : LAPolicy.deviceOwnerAuthenticationWithBiometrics
if context.canEvaluatePolicy(.deviceOwnerAuthenticationWithBiometrics, error: &error){
obj["isAvailable"] = true
Expand All @@ -53,7 +53,7 @@ public class NativeBiometric: CAPPlugin {
let context = LAContext()
var canEvaluateError: NSError?

let useFallback = call.getBool("useFallback", defaultValue: false)
let useFallback = call.getBool("useFallback", false)

let policy = useFallback ? LAPolicy.deviceOwnerAuthentication : LAPolicy.deviceOwnerAuthenticationWithBiometrics

Expand Down

0 comments on commit c3062a8

Please sign in to comment.