Skip to content

Commit

Permalink
chore: update Amplify dependency to 2.38.0 for clock skew support (#170)
Browse files Browse the repository at this point in the history
* chore: update Amplify dependency to 2.38.0 for clock skew support

* revert debugging code
  • Loading branch information
thisisabhash authored Aug 20, 2024
1 parent e08a76b commit d7147fc
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/amplify-swift",
"state" : {
"revision" : "7846328106dba471b3fb35170155e92aad50d427",
"version" : "2.33.3"
"revision" : "79d062d354bb190666774e8ef3c83ad52f023889",
"version" : "2.38.0"
}
},
{
Expand Down Expand Up @@ -50,17 +50,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "e78ae0220e17525a15ac68c697a155eb7a672a8e",
"version" : "0.15.0"
"revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8",
"version" : "0.15.3"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "e97a6fcb1ab07462881ac165fdbb37f067e205d5",
"version" : "1.5.4"
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
}
],
Expand Down
44 changes: 23 additions & 21 deletions HostApp/HostApp/Views/ExampleLivenessView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,29 @@ struct ExampleLivenessView: View {
set: { _ in }
),
onCompletion: { result in
switch result {
case .success:
withAnimation { viewModel.presentationState = .result }
case .failure(.sessionNotFound), .failure(.cameraPermissionDenied), .failure(.accessDenied):
viewModel.presentationState = .liveness
isPresented = false
case .failure(.userCancelled):
viewModel.presentationState = .liveness
isPresented = false
case .failure(.sessionTimedOut):
viewModel.presentationState = .error(.sessionTimedOut)
case .failure(.socketClosed):
viewModel.presentationState = .error(.socketClosed)
case .failure(.countdownNoFace), .failure(.countdownFaceTooClose), .failure(.countdownMultipleFaces):
viewModel.presentationState = .error(.countdownFaceTooClose)
case .failure(.invalidSignature):
viewModel.presentationState = .error(.invalidSignature)
case .failure(.cameraNotAvailable):
viewModel.presentationState = .error(.cameraNotAvailable)
default:
viewModel.presentationState = .liveness
DispatchQueue.main.async {
switch result {
case .success:
withAnimation { viewModel.presentationState = .result }
case .failure(.sessionNotFound), .failure(.cameraPermissionDenied), .failure(.accessDenied):
viewModel.presentationState = .liveness
isPresented = false
case .failure(.userCancelled):
viewModel.presentationState = .liveness
isPresented = false
case .failure(.sessionTimedOut):
viewModel.presentationState = .error(.sessionTimedOut)
case .failure(.socketClosed):
viewModel.presentationState = .error(.socketClosed)
case .failure(.countdownNoFace), .failure(.countdownFaceTooClose), .failure(.countdownMultipleFaces):
viewModel.presentationState = .error(.countdownFaceTooClose)
case .failure(.invalidSignature):
viewModel.presentationState = .error(.invalidSignature)
case .failure(.cameraNotAvailable):
viewModel.presentationState = .error(.cameraNotAvailable)
default:
viewModel.presentationState = .liveness
}
}
}
)
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/aws-amplify/amplify-swift",
"state" : {
"revision" : "dbc4a0412f4b5cd96f3e756e78bbd1e8e0a35a2f",
"version" : "2.35.4"
"revision" : "79d062d354bb190666774e8ef3c83ad52f023889",
"version" : "2.38.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
targets: ["FaceLiveness"]),
],
dependencies: [
.package(url: "https://github.com/aws-amplify/amplify-swift", exact: "2.35.4")
.package(url: "https://github.com/aws-amplify/amplify-swift", exact: "2.38.0")
],
targets: [
.target(
Expand Down

0 comments on commit d7147fc

Please sign in to comment.