Skip to content

Commit 659bd1a

Browse files
authored
chore: add README.md to HostApp (#22)
1 parent e2ca4c0 commit 659bd1a

File tree

3 files changed

+72
-28
lines changed

3 files changed

+72
-28
lines changed

HostApp/HostApp.xcodeproj/project.pbxproj

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
73B461192A0A9B9F0085B8F8 /* AmplifyConfiguration in Resources */ = {isa = PBXBuildFile; fileRef = 73B461182A0A9B9F0085B8F8 /* AmplifyConfiguration */; };
1011
90236C77299D6D41009FD1A7 /* HostAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90236C76299D6D40009FD1A7 /* HostAppApp.swift */; };
11-
90236C7C299D6D9A009FD1A7 /* amplifyconfiguration_gamma.json in Resources */ = {isa = PBXBuildFile; fileRef = 90236C79299D6D9A009FD1A7 /* amplifyconfiguration_gamma.json */; };
12-
90236C7D299D6D9A009FD1A7 /* awsconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = 90236C7A299D6D9A009FD1A7 /* awsconfiguration.json */; };
13-
90236C7E299D6D9A009FD1A7 /* amplifyconfiguration.json in Resources */ = {isa = PBXBuildFile; fileRef = 90236C7B299D6D9A009FD1A7 /* amplifyconfiguration.json */; };
1412
90493F822992D64000CFE674 /* LivenessResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90493F812992D64000CFE674 /* LivenessResult.swift */; };
1513
904CC73D2996E650002E0753 /* RootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 904CC73C2996E650002E0753 /* RootView.swift */; };
1614
906AB82029E9F0E9007FFC81 /* FaceLiveness in Frameworks */ = {isa = PBXBuildFile; productRef = 906AB81F29E9F0E9007FFC81 /* FaceLiveness */; };
@@ -55,11 +53,9 @@
5553
/* End PBXContainerItemProxy section */
5654

5755
/* Begin PBXFileReference section */
56+
73B461182A0A9B9F0085B8F8 /* AmplifyConfiguration */ = {isa = PBXFileReference; lastKnownFileType = folder; path = AmplifyConfiguration; sourceTree = "<group>"; };
5857
900129D4298ACA9100AE3524 /* HostApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HostApp.entitlements; sourceTree = "<group>"; };
5958
90236C76299D6D40009FD1A7 /* HostAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HostAppApp.swift; sourceTree = "<group>"; };
60-
90236C79299D6D9A009FD1A7 /* amplifyconfiguration_gamma.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = amplifyconfiguration_gamma.json; sourceTree = "<group>"; };
61-
90236C7A299D6D9A009FD1A7 /* awsconfiguration.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = awsconfiguration.json; sourceTree = "<group>"; };
62-
90236C7B299D6D9A009FD1A7 /* amplifyconfiguration.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = amplifyconfiguration.json; sourceTree = "<group>"; };
6359
90493F812992D64000CFE674 /* LivenessResult.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LivenessResult.swift; sourceTree = "<group>"; };
6460
90493FB0299577FE00CFE674 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
6561
904CC73C2996E650002E0753 /* RootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RootView.swift; sourceTree = "<group>"; };
@@ -122,21 +118,10 @@
122118
name = Frameworks;
123119
sourceTree = "<group>";
124120
};
125-
90236C78299D6D9A009FD1A7 /* AmplifyConfiguration */ = {
126-
isa = PBXGroup;
127-
children = (
128-
90236C79299D6D9A009FD1A7 /* amplifyconfiguration_gamma.json */,
129-
90236C7A299D6D9A009FD1A7 /* awsconfiguration.json */,
130-
90236C7B299D6D9A009FD1A7 /* amplifyconfiguration.json */,
131-
);
132-
path = AmplifyConfiguration;
133-
sourceTree = SOURCE_ROOT;
134-
};
135121
9070FF97285112B4009867D5 = {
136122
isa = PBXGroup;
137123
children = (
138124
9070FFA2285112B4009867D5 /* HostApp */,
139-
9070FFB3285112B5009867D5 /* HostAppTests */,
140125
9070FFBD285112B5009867D5 /* HostAppUITests */,
141126
9070FFA1285112B4009867D5 /* Products */,
142127
90215EED291E9FB60050F2AD /* Frameworks */,
@@ -156,7 +141,7 @@
156141
9070FFA2285112B4009867D5 /* HostApp */ = {
157142
isa = PBXGroup;
158143
children = (
159-
90236C78299D6D9A009FD1A7 /* AmplifyConfiguration */,
144+
73B461182A0A9B9F0085B8F8 /* AmplifyConfiguration */,
160145
90FDF2A3299BDF340002CE7D /* Model */,
161146
90493FB0299577FE00CFE674 /* Info.plist */,
162147
900129D4298ACA9100AE3524 /* HostApp.entitlements */,
@@ -177,13 +162,6 @@
177162
path = "Preview Content";
178163
sourceTree = "<group>";
179164
};
180-
9070FFB3285112B5009867D5 /* HostAppTests */ = {
181-
isa = PBXGroup;
182-
children = (
183-
);
184-
path = HostAppTests;
185-
sourceTree = "<group>";
186-
};
187165
9070FFBD285112B5009867D5 /* HostAppUITests */ = {
188166
isa = PBXGroup;
189167
children = (
@@ -344,10 +322,8 @@
344322
isa = PBXResourcesBuildPhase;
345323
buildActionMask = 2147483647;
346324
files = (
347-
90236C7D299D6D9A009FD1A7 /* awsconfiguration.json in Resources */,
348325
9070FFAB285112B5009867D5 /* Preview Assets.xcassets in Resources */,
349-
90236C7C299D6D9A009FD1A7 /* amplifyconfiguration_gamma.json in Resources */,
350-
90236C7E299D6D9A009FD1A7 /* amplifyconfiguration.json in Resources */,
326+
73B461192A0A9B9F0085B8F8 /* AmplifyConfiguration in Resources */,
351327
9070FFA8285112B5009867D5 /* Assets.xcassets in Resources */,
352328
);
353329
runOnlyForDeploymentPostprocessing = 0;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"UserAgent": "aws-amplify-cli/2.0",
3+
"Version": "1.0",
4+
"auth": {
5+
"plugins": {
6+
"awsCognitoAuthPlugin": {
7+
"CredentialsProvider": {
8+
"CognitoIdentity": {
9+
"Default": {
10+
"PoolId": "us-east-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
11+
"Region": "us-east-1"
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"api": {
19+
"plugins": {
20+
"awsAPIPlugin": {
21+
"liveness": {
22+
"endpointType": "REST",
23+
"endpoint": "https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/xxxx",
24+
"region": "us-east-1",
25+
"authorizationType": "AWS_IAM"
26+
}
27+
}
28+
}
29+
}
30+
}

HostApp/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<img src="https://s3.amazonaws.com/aws-mobile-hub-images/aws-amplify-logo.png" alt="AWS Amplify" width="225">
2+
3+
---
4+
5+
# Amplify UI Liveness Sample App
6+
7+
Amplify UI FaceLivenessDetector provides a UI component for Amazon Rekognition Face Liveness that helps developers verify that only real users, not bad actors using spoofs, can access your services.
8+
9+
More information on setting up and using the FaceLivenessDetector is in the [Amplify UI Face Liveness documentation](https://ui.docs.amplify.aws/swift/connected-components/liveness).
10+
11+
## Set Up
12+
13+
This sample app depends on AWS Amplify library and assumes Amplify Auth and Amplify API are configured. You will need to either update the `amplifyconfiguration.json` with the missing configuration details or replace the placeholder file wit your `amplifyconfiguration.json` file. For additional details on configuring Amplify, see [Face Liveness documentation](https://ui.docs.amplify.aws/swift/connected-components/liveness#step-1-configure-amplify)
14+
15+
To update the `amplifyconfiguration.json`:
16+
Edit the file with the appropriate credential provider Pool ID and Region.
17+
```
18+
"Default": {
19+
"PoolId": "us-east-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
20+
"Region": "us-east-1"
21+
}
22+
```
23+
24+
This sample app assumes that the session id is fetched from an API REST endpoint, update the Amplify API Category section of the `amplifyconfiguration.json` file with the appropriate configuration for your REST API endpoint
25+
```
26+
"awsAPIPlugin": {
27+
"liveness": {
28+
"endpointType": "REST",
29+
"endpoint": "https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/xxxx",
30+
"region": "us-east-1",
31+
"authorizationType": "AWS_IAM"
32+
}
33+
}
34+
```
35+
36+
## Running Sample App
37+
The sample app depends on a real device camera to capture videos. Open the sample app in Xcode and deploy the app onto a real device.
38+

0 commit comments

Comments
 (0)