Skip to content

Commit e138caa

Browse files
Merge branch 'main' of github.com:Elite-HRV/spren-vision-ios
2 parents a65f0a2 + 684d130 commit e138caa

File tree

1 file changed

+45
-32
lines changed

1 file changed

+45
-32
lines changed

docs/Spren-Vision/Spren-Vision-iOS-SDK.md

Lines changed: 45 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,51 @@ import SprenUI
1616

1717
// create SprenUI configuration
1818
let config = SprenUI.Config(
19-
// API
20-
baseURL: "https://test.api.spren.com",
21-
apiKey: "<API key>",
22-
23-
// user
24-
userID: "<user ID>",
25-
userGender: <optional, male, female, or other>,
26-
userBirthdate: <optional, Date>,
27-
28-
// UI
29-
primaryColor: <optional, Color>, // used for buttons
30-
secondaryColor: <optional, Color>, // used for graphics
31-
// optionally override default intro screen graphics
32-
// provide names for image sets in main bundle xcassets
33-
// all 5 are required
34-
graphics: [
35-
.greeting1: "<image set name>", // greeting screen 1
36-
.greeting2: "<image set name>", // greeting screen 2
37-
.fingerOnCamera: "<image set name>", // finger on camera instruction screen
38-
.noCamera: "<image set name>", // camera access authorization denied screen
39-
.serverError: "<image set name>" // server or calculation error
40-
],
41-
42-
onCancel: {
43-
// user exited UI before completing a reading
44-
// dismiss SprenUI
45-
},
46-
onFinish: { results in
47-
// user completed a reading!
48-
print(results)
49-
// dismiss SprenUI
50-
}
19+
// API
20+
baseURL: "https://test.api.spren.com",
21+
apiKey: "<API key>",
22+
23+
// user
24+
userID: "<user ID>",
25+
userGender: <optional, male, female, or other>,
26+
userBirthdate: <optional, Date>,
27+
28+
// UI
29+
primaryColor: <optional, Color>, // used for buttons
30+
secondaryColor: <optional, Color>, // used for graphics
31+
32+
project: .fingerCamera, // or `.bodyComp`
33+
34+
// optionally override default intro screen graphics
35+
// provide names for image sets in main bundle xcassets
36+
// *all are required for each project if overriding
37+
graphics: [
38+
// for a `.fingerCamera` project
39+
.greeting1: "<image set name>", // greeting screen 1
40+
.greeting2: "<image set name>", // greeting screen 2
41+
.fingerOnCamera: "<image set name>", // finger on camera instruction screen
42+
.noCamera: "<image set name>", // camera access authorization denied screen
43+
.serverError: "<image set name>" // server or calculation error
44+
45+
// for a `.bodyComp` project
46+
.setupGuide: "<image set name>",
47+
.serverError: "<image set name>",
48+
.privacy: "<image set name>",
49+
.cameraAccessDenied: "<image set name>",
50+
.incorrectBodyPosition: "<image set name>",
51+
.greetings: "<image set name>",
52+
.bodyPosition: "<image set name>"
53+
],
54+
55+
onCancel: {
56+
// user exited UI before completing a reading
57+
// dismiss SprenUI
58+
},
59+
onFinish: { results in
60+
// user completed a reading!
61+
print(results)
62+
// dismiss SprenUI
63+
}
5164
)
5265

5366
// init SprenUI view

0 commit comments

Comments
 (0)