Skip to content

Commit cddece5

Browse files
authored
chore(build): add default init for ChallengeOptions (#202)
* chore(build): add default init for ChallengeOptions * update code
1 parent bc1fcdb commit cddece5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/FaceLiveness/Views/Liveness/FaceLivenessDetectionView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public struct FaceLivenessDetectorView: View {
3030
credentialsProvider: AWSCredentialsProvider? = nil,
3131
region: String,
3232
disableStartView: Bool = false,
33-
challengeOptions: ChallengeOptions,
33+
challengeOptions: ChallengeOptions = .init(),
3434
isPresented: Binding<Bool>,
3535
onCompletion: @escaping (Result<Void, FaceLivenessDetectionError>) -> Void
3636
) {
@@ -78,7 +78,7 @@ public struct FaceLivenessDetectorView: View {
7878
credentialsProvider: AWSCredentialsProvider? = nil,
7979
region: String,
8080
disableStartView: Bool = false,
81-
challengeOptions: ChallengeOptions,
81+
challengeOptions: ChallengeOptions = .init(),
8282
isPresented: Binding<Bool>,
8383
onCompletion: @escaping (Result<Void, FaceLivenessDetectionError>) -> Void,
8484
captureSession: LivenessCaptureSession
@@ -356,7 +356,7 @@ public struct ChallengeOptions {
356356
let faceMovementChallengeOption: FaceMovementChallengeOption
357357
let faceMovementAndLightChallengeOption: FaceMovementAndLightChallengeOption
358358

359-
public init(faceMovementChallengeOption: FaceMovementChallengeOption,
359+
public init(faceMovementChallengeOption: FaceMovementChallengeOption = .init(camera: .front),
360360
faceMovementAndLightChallengeOption: FaceMovementAndLightChallengeOption = .init()) {
361361
self.faceMovementChallengeOption = faceMovementChallengeOption
362362
self.faceMovementAndLightChallengeOption = faceMovementAndLightChallengeOption

0 commit comments

Comments
 (0)