You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-35Lines changed: 43 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,14 @@ A react native wrapper of Yoti IDV for [Android](https://github.com/getyoti/yoti
10
10
To integrate with Yoti IDV, a working infrastructure is needed (see [developers.yoti.com](https://developers.yoti.com/identity-verification/overview) for more details or get in touch with us [here](https://developers.yoti.com/support)).
In addition, you should add [`NSCameraUsageDescription`](https://developer.apple.com/documentation/bundleresources/information_property_list/nscamerausagedescription) to your `Info.plist`.
87
-
88
-
And if you have included `YotiNFC`in your target, make sure to also:
89
-
- Add [`NFCReaderUsageDescription`](https://developer.apple.com/documentation/bundleresources/information_property_list/nfcreaderusagedescription) to your `Info.plist`
90
-
- Add [`com.apple.developer.nfc.readersession.iso7816.select-identifiers`](https://developer.apple.com/documentation/bundleresources/information_property_list/select-identifiers) to your `Info.plist` and include [`A0000002471001`](https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf) as an application identifier for your app to support
91
-
- Turn on [`Near Field Communication Tag Reading`](https://developer.apple.com/documentation/corenfc/building_an_nfc_tag-reader_app) under the Signing & Capabilities tab for your project’s target
88
+
In addition, you should [modify the properties and capabilities of your project's target](https://github.com/getyoti/yoti-doc-scan-ios?tab=readme-ov-file#5-modify-the-properties-and-capabilities-of-your-projects-target).
92
89
93
90
## Usage
94
91
### 1. Import module
95
92
```javascript
96
93
import RNYotiDocScan from '@getyoti/yoti-doc-scan-react-native';
97
94
```
98
-
### 2. Launch a session
99
-
Launch a session with its required parameters using the `startSession` function.
95
+
### 2. Optional configuration and customization
96
+
For customization on Android, you can refer to the documentation outlined [here](https://github.com/getyoti/yoti-doc-scan-android?tab=readme-ov-file#customisation). In addition, you can choose to also set a request code:
On iOS, you can set the primary colors using the following API:
101
+
On iOS, the SDK expects launched sessions to contain multiple flows by default. To enable single-flow sessions, configure and include [yoti-doc-scan-react-native-configuration-ios.json](templates/yoti-doc-scan-react-native-configuration-ios.json) in your project’s target and then set the configuration as follows:
To customize the colors on Android, please refer to its separate [documentation](https://github.com/getyoti/yoti-doc-scan-android#colours).
108
+
Ensure that only one module type property is set to `true` when `single_flow` is enabled.
117
109
118
-
In addition, you can choose to also specify a request code on Android:
110
+
To customize the appearance on iOS, you can configure the SDK using [yoti-doc-scan-react-native-configuration-with-theme-ios.json](templates/yoti-doc-scan-react-native-configuration-with-theme-ios.json) instead, which supports the following options for theming:
111
+
112
+
- Light and dark mode color themes. We also support specifying only a primary color for each mode
113
+
- Typography theme (system and custom fonts, font weight, size, line height multiple and kern)
114
+
- Spacing mode (compact, regular and relaxed)
115
+
- Shape theme (corner radius and border width)
116
+
- Icon theme (custom vectors, system and custom SF Symbols, incl. localized ones)
117
+
- Illustration theme (custom vectors)
118
+
119
+
All customisation types are optional, and can be set independently from each other.
120
+
121
+
### 3. Launch a session
122
+
Launch a session with its required parameters using the `start` function.
Yoti IDV supports the 9 languages listed in the table below, but their use is driven by the localization configuration of your target. If your target only supports a subset of our SDK's supported languages, our SDK will fall back to English on the ones your target doesn't support.
131
+
Our SDK supports the 9 languages listed in the table below, but their use is driven by the localization configuration of your target. If your target only supports a subset of our SDK's supported languages, our SDK will fall back to English on the ones your target doesn't support.
125
132
126
133
Language | Code
127
134
:-- | :--
@@ -135,10 +142,11 @@ Russian | ru
135
142
Spanish | es
136
143
Turkish | tr
137
144
138
-
## Error codes
145
+
## Status codes
139
146
Code | Description
140
147
:-- | :--
141
-
1000 | No error occurred. The user cancelled the session
148
+
0 | The user completed the session
149
+
1000 | The user cancelled the session
142
150
2000 | Unauthorised request (wrong or expired session token)
0 commit comments