aws-amplify / amplify-ui-swift-liveness

This repository offers a UI component for Amazon Rekognition Face Liveness, enabling developers to ensure that only authentic users, and not bad actors using spoofs, can access their services.
https://ui.docs.amplify.aws/swift/connected-components/liveness
Apache License 2.0
11 stars 25 forks source link

fix: Updating the camera frame position when the subviews are laid out #158

Closed ruisebas closed 4 months ago

ruisebas commented 4 months ago

Description of changes:

The _LivenessViewController currently centers its camera frame only when its view is loaded, but not when its subviews are laid out. This causes the video feed to appear off-centered when the FaceLivenessDetectorView is stacked with other components (i.e. headers, navigation bars, etc), or when used in a UIHostingController.

This PR fixes this issue by re-centering the camera frame on viewDidLayoutSubviews().


I'm also removing the liveness package being unnecessary copied as a resource for the example HostApp


Check points: (check or cross out if not relevant)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 30.48%. Comparing base (75a7c3c) to head (ab1ebf1). Report is 3 commits behind head on main.

Files Patch % Lines
...veness/Views/Liveness/LivenessViewController.swift 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #158 +/- ## ========================================== - Coverage 30.51% 30.48% -0.03% ========================================== Files 57 57 Lines 2225 2227 +2 ========================================== Hits 679 679 - Misses 1546 1548 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.