-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Box Oval Interface for Selfie Capture Screen (#250)
* improve code and file structure * add the liveness guides * add some config values to liveness guides view. * change lottie animation frame * run pod install * setup animation progress time for the liiveness guide lottie animation. * fix homeview fore each warnings. * connect face bounds detection to the the indicator. * add throttling to camera feed. * use full screen cover to present home screen products. * control progress arc visibility based on progress. * add a dummy submit function. * setup timers. * add animation to the progress fill arcs. * refactor the components of liveness guides view. * setup delay timer and introduce state for the current animation that should be displayed with instructions after delay. * update arc shape init * add new lottie files. define a guide animation enum to hold the animation details. * some refactoring. * create a validator class for the face observation data. * refactor buffer image processing and communication between face detector, face validator and selfie view model. some code formatting. * remove some debug views. some refactoring and improvements. * make capture instruction strings localizable * introduce current liveness task into the face validator to set the right capture instruction. * fix cropping for selfie quality check. * show or hide the circular ring and the liveness guides based on whether face is within bounds. * add processing view to view captured images. * reset animation as user is completing liveness checks * inject current liveness task into liveness guide to control which progress is showing. update reset delay timer on main thread. use appropriate error for face detection during cropping. * processing screen layout. introduce a backport of stateobject. * run pod install to import missing lottie files. * present selfie capture flow in navigation view, programmatically navigate to processing view based on capture status. add a circular progress view with a loader image for the selfie processing view. * refactor view appear setup and reset selfie capture state variables * import submit method from selfie viewmodel. * extract submit selfie functionality into a new class to manage the submission processes. * some refactoring * move backport and stateobject to helper folder. * code formatting. * restore threshold value * replace ObservedObject with StateObject in HomeView so that it's initialised once. * use proxy size instead of frame for window size calculation and face layout guide positioning. * remove stateobject backport * use a delegate to communicate selfie submission updates to selfie view model. add the right title to processing screen. * update processing changes on main thread. * inject failure reason into the api call for submitting selfie * rename selfie submission manager * reset the threshold for timeout for liveness check. * remove presentation mode variable. * introduce an environment key to manage dismissing of the selfie capture flow. * improve error handling of selfie capture. * localise strings. * code formatting. * pod install * make loader background color themeable. * run pod install. * fix missing files and build errors. * redesign selfie capture screen to use box and oval for camera area and face bounding area * add a view to preview selfie image, also add an actions view. * redesign the the progress arcs for active liveness. * improvements to validating face bounding box. add a frame to selfie preview image. * remove processing view, add a view state to control visibility of different items based on capture state. * adjust face size and position evaluation. fix layout for attribution and retry button. * change active liveness progress colours * code formatting. * update faceboundmultiplier constant. * refactor task timer. * improve submission handling.
- Loading branch information
Showing
35 changed files
with
956 additions
and
330 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
11 changes: 11 additions & 0 deletions
11
Sources/SmileID/Classes/Networking/Models/FailureReason.swift
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Foundation | ||
|
||
public enum FailureReason { | ||
case activeLivenessTimedOut | ||
|
||
var key: String { | ||
switch self { | ||
case .activeLivenessTimedOut: return "mobile_active_liveness_timed_out" | ||
} | ||
} | ||
} |
Oops, something went wrong.