@@ -8,17 +8,46 @@ React Native ID Scanner wrapper for idscan sdk
88npm install react-native-idscan-sdk
99```
1010
11+ ## iOS Quirks
12+
13+ This plugins requires the following usage descriptions added to the application plist:
14+
15+ - ` NSCameraUsageDescription ` specifies the reason for your app to access the device’s camera.
16+ - ` NSPhotoLibraryUsageDescription ` specifies the reason for your app to access the user’s photo library.
17+
18+ ## Android Quirks
19+
20+ - Add idscan-public maven repository to the project build.gradle file.
21+
22+ ```
23+ allprojects {
24+ repositories {
25+ ...
26+ maven {
27+ url 'https://www.myget.org/F/idscan-public/maven/'
28+ }
29+ ...
30+ }
31+ }
32+ ```
33+
34+ - Insert the following into the project ` AndroidManifest.xml ` to request camera permission.
35+
36+ ```
37+ <uses-permission android:name="android.permission.CAMERA" />
38+ ```
39+
1140## Usage
1241
1342``` js
1443import { TouchableOpacity , Text } from ' react-native'
15- import { scan , IDScanner_Constants } from ' react-native-idscan-sdk' ;
44+ import { scan , IDSCANNER_CONSTANTS } from ' react-native-idscan-sdk' ;
1645
1746// ...
1847
1948const onScanID = () => {
2049 scan (
21- IDScanner_Constants .TYPE_PDF , // TYPE_COMBINED, TYPE_MRZ, TYPE_PDF
50+ IDSCANNER_CONSTANTS .TYPE_PDF , // TYPE_COMBINED, TYPE_MRZ, TYPE_PDF
2251 {
2352 // iOS
2453 iosDetectorPDFLicenseKey: ' iOS IdScanner PDF License Key here' ,
@@ -44,35 +73,47 @@ const onScanID = () => {
4473
4574```
4675
47- ## iOS Quirks
48-
49- This plugins requires the following usage descriptions:
50-
51- - ` NSCameraUsageDescription ` specifies the reason for your app to access the device's camera.
52- - ` NSPhotoLibraryUsageDescription ` specifies the reason for your app to access the user's photo library.
53-
54- ## Android Quirks
55-
56- - Add idscan-public maven repository to the project build.gradle file.
76+ ### PDF417 Response
5777
5878```
59- allprojects {
60- repositories {
61- ...
62- maven {
63- url 'https://www.myget.org/F/idscan-public/maven/'
64- }
65- ...
66- }
79+ {
80+ namePrefix: string;
81+ IIN: string;
82+ race: string;
83+ gender: string;
84+ fullName: string;
85+ issuerIdNum: string;
86+ city: string;
87+ weight: string;
88+ height: string;
89+ address1: string;
90+ address2: string;
91+ classificationCode: string;
92+ issueDate: string;
93+ licenseNumber: string;
94+ expirationDate: string;
95+ endorsementsCode: string;
96+ issuedBy: string;
97+ firstName: string;
98+ middleName: string;
99+ lastName: string;
100+ nameSuffix: string;
101+ restrictionsCode: string;
102+ birthDate: string;
103+ countryCode: string;
104+ jurisdictionCode: string;
105+ hairColor: string;
106+ eyeColor: string;
107+ documentType: string;
108+ country: string;
109+ weightKG: string;
110+ weightLBS: string;
111+ restrictionCode: string;
112+ postalCode: string;
113+ specification: string;
67114}
68115```
69116
70- - You must ask for camera permission. Insert this to your project's ` AndroidManifest.xml `
71-
72- ```
73- <uses-permission android:name="android.permission.CAMERA" />
74- ```
75-
76117## Contributing
77118
78119See the [ contributing guide] ( CONTRIBUTING.md ) to learn how to contribute to the repository and the development workflow.
0 commit comments