From c70abed70469510c498280bbbc5cf4b5ca06b679 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 9 Dec 2024 16:14:09 -0800 Subject: [PATCH 1/6] chore: update Amplify dependency for WebSocketSession changes --- .../xcshareddata/swiftpm/Package.resolved | 21 ++++++------------- Package.swift | 2 +- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8694f40..236d844 100644 --- a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,14 +1,5 @@ { "pins" : [ - { - "identity" : "amplify-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/aws-amplify/amplify-swift", - "state" : { - "revision" : "95d8f16780c4e11a243fdae93c386195347aea66", - "version" : "2.42.1" - } - }, { "identity" : "amplify-swift-utils-notifications", "kind" : "remoteSourceControl", @@ -23,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-crt-swift", "state" : { - "revision" : "7b42e0343f28b3451aab20840dc670abd12790bd", - "version" : "0.36.0" + "revision" : "3f844bef042cc0a4c3381f7090414ce3f9a7e935", + "version" : "0.37.0" } }, { @@ -32,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift.git", "state" : { - "revision" : "828358a2c39d138325b0f87a2d813f4b972e5f4f", - "version" : "1.0.0" + "revision" : "c6c1064da9bfccb119a7a8ab9ba636fb3bbfa6f5", + "version" : "1.0.47" } }, { @@ -41,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/smithy-lang/smithy-swift", "state" : { - "revision" : "0ed3440f8c41e27a0937364d5035d2d4fefb8aa3", - "version" : "0.71.0" + "revision" : "3cd9f181b3ba8ff71da43bf53c09f8de6790a4ad", + "version" : "0.96.0" } }, { diff --git a/Package.swift b/Package.swift index 01c172c..48bdf9b 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,7 @@ let package = Package( targets: ["FaceLiveness"]), ], dependencies: [ - .package(url: "https://github.com/aws-amplify/amplify-swift", exact: "2.42.1") + .package(url: "https://github.com/aws-amplify/amplify-swift", branch: "fix/liveness-websocketsession-delegatequeue") ], targets: [ .target( From 144f5e13623cf60909057c9570c5ec671e12cbf7 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 9 Dec 2024 16:16:00 -0800 Subject: [PATCH 2/6] Update Package.resolved --- Package.resolved | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Package.resolved b/Package.resolved index 8694f40..f47fce9 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/aws-amplify/amplify-swift", "state" : { - "revision" : "95d8f16780c4e11a243fdae93c386195347aea66", - "version" : "2.42.1" + "branch" : "fix/liveness-websocketsession-delegatequeue", + "revision" : "36c09fc28f3c87124f8e42909a50c63d90463109" } }, { @@ -23,8 +23,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-crt-swift", "state" : { - "revision" : "7b42e0343f28b3451aab20840dc670abd12790bd", - "version" : "0.36.0" + "revision" : "3f844bef042cc0a4c3381f7090414ce3f9a7e935", + "version" : "0.37.0" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/awslabs/aws-sdk-swift.git", "state" : { - "revision" : "828358a2c39d138325b0f87a2d813f4b972e5f4f", - "version" : "1.0.0" + "revision" : "c6c1064da9bfccb119a7a8ab9ba636fb3bbfa6f5", + "version" : "1.0.47" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/smithy-lang/smithy-swift", "state" : { - "revision" : "0ed3440f8c41e27a0937364d5035d2d4fefb8aa3", - "version" : "0.71.0" + "revision" : "3cd9f181b3ba8ff71da43bf53c09f8de6790a4ad", + "version" : "0.96.0" } }, { From b0a3688ca7d4376f7080d3755292f967179d805e Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 9 Dec 2024 16:21:21 -0800 Subject: [PATCH 3/6] Update HostApp Package.resolved --- .../xcshareddata/swiftpm/Package.resolved | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 236d844..bb72e12 100644 --- a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,14 @@ { "pins" : [ + { + "identity" : "amplify-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/aws-amplify/amplify-swift", + "state" : { + "branch" : "fix/liveness-websocketsession-delegatequeue", + "revision" : "36c09fc28f3c87124f8e42909a50c63d90463109" + } + }, { "identity" : "amplify-swift-utils-notifications", "kind" : "remoteSourceControl", @@ -50,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", - "version" : "1.6.1" + "revision" : "96a2f8a0fa41e9e09af4585e2724c4e825410b91", + "version" : "1.6.2" } } ], From f7a90003a3235a05325a8045e1b6e676f9a54e83 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Tue, 7 Jan 2025 13:46:46 -0800 Subject: [PATCH 4/6] update host app code --- HostApp/.gitignore | 21 +++++++++++++++++++ HostApp/HostApp.xcodeproj/project.pbxproj | 10 +++++++++ HostApp/HostApp/HostAppApp.swift | 1 + .../HostApp/Views/ExampleLivenessView.swift | 8 +++++-- 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 HostApp/.gitignore diff --git a/HostApp/.gitignore b/HostApp/.gitignore new file mode 100644 index 0000000..f54d96e --- /dev/null +++ b/HostApp/.gitignore @@ -0,0 +1,21 @@ +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/mock-api-resources +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end \ No newline at end of file diff --git a/HostApp/HostApp.xcodeproj/project.pbxproj b/HostApp/HostApp.xcodeproj/project.pbxproj index 7d1314c..76052c1 100644 --- a/HostApp/HostApp.xcodeproj/project.pbxproj +++ b/HostApp/HostApp.xcodeproj/project.pbxproj @@ -131,6 +131,7 @@ 9070FFBD285112B5009867D5 /* HostAppUITests */, 9070FFA1285112B4009867D5 /* Products */, 90215EED291E9FB60050F2AD /* Frameworks */, + A5A9AF5054D0FF13505B212A /* AmplifyConfig */, ); sourceTree = ""; }; @@ -213,6 +214,15 @@ path = Model; sourceTree = ""; }; + A5A9AF5054D0FF13505B212A /* AmplifyConfig */ = { + isa = PBXGroup; + children = ( + 973619242BA378690003A590 /* awsconfiguration.json */, + 973619232BA378690003A590 /* amplifyconfiguration.json */, + ); + name = AmplifyConfig; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ diff --git a/HostApp/HostApp/HostAppApp.swift b/HostApp/HostApp/HostAppApp.swift index 21b409f..61863c5 100644 --- a/HostApp/HostApp/HostAppApp.swift +++ b/HostApp/HostApp/HostAppApp.swift @@ -27,6 +27,7 @@ struct HostAppApp: App { init() { do { + Amplify.Logging.logLevel = .verbose let auth = AWSCognitoAuthPlugin() let api = AWSAPIPlugin() try Amplify.add(plugin: auth) diff --git a/HostApp/HostApp/Views/ExampleLivenessView.swift b/HostApp/HostApp/Views/ExampleLivenessView.swift index f24045d..5f6868b 100644 --- a/HostApp/HostApp/Views/ExampleLivenessView.swift +++ b/HostApp/HostApp/Views/ExampleLivenessView.swift @@ -48,8 +48,12 @@ struct ExampleLivenessView: View { viewModel.presentationState = .error(.invalidSignature) case .failure(.cameraNotAvailable): viewModel.presentationState = .error(.cameraNotAvailable) - default: - viewModel.presentationState = .liveness + case .failure(.validation): + viewModel.presentationState = .error(.validation) + case .failure(.faceInOvalMatchExceededTimeLimitError): + viewModel.presentationState = .error(.faceInOvalMatchExceededTimeLimitError) + case .failure(_): + viewModel.presentationState = .error(.unknown) } } } From f0734e392e10d7e80685b16a5fe78f46fb575c90 Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 13 Jan 2025 10:14:17 -0800 Subject: [PATCH 5/6] update amplify to 2.45.4 --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index bb72e12..ee72460 100644 --- a/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/HostApp/HostApp.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/aws-amplify/amplify-swift", "state" : { - "branch" : "fix/liveness-websocketsession-delegatequeue", - "revision" : "36c09fc28f3c87124f8e42909a50c63d90463109" + "revision" : "7b1d5ee05a23ea24c7458dffed1c563c8501042d", + "version" : "2.45.4" } }, { From c8fd883e6d6b17d178578308ee87a4081085685f Mon Sep 17 00:00:00 2001 From: Abhash Kumar Singh Date: Mon, 13 Jan 2025 10:17:28 -0800 Subject: [PATCH 6/6] add missed files --- Package.resolved | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index f47fce9..1977045 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/aws-amplify/amplify-swift", "state" : { - "branch" : "fix/liveness-websocketsession-delegatequeue", - "revision" : "36c09fc28f3c87124f8e42909a50c63d90463109" + "revision" : "7b1d5ee05a23ea24c7458dffed1c563c8501042d", + "version" : "2.45.4" } }, { diff --git a/Package.swift b/Package.swift index 48bdf9b..a302e43 100644 --- a/Package.swift +++ b/Package.swift @@ -13,7 +13,7 @@ let package = Package( targets: ["FaceLiveness"]), ], dependencies: [ - .package(url: "https://github.com/aws-amplify/amplify-swift", branch: "fix/liveness-websocketsession-delegatequeue") + .package(url: "https://github.com/aws-amplify/amplify-swift", exact: "2.45.4") ], targets: [ .target(