@regulaforensics/react-native-document-reader-api 6.4.0 → 6.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +4 -29
- package/android/src/main/AndroidManifest.xml +5 -1
- package/android/src/main/java/com/regula/documentreader/BluetoothUtil.kt +108 -0
- package/android/src/main/java/com/regula/documentreader/Helpers.java +5 -6
- package/android/src/main/java/com/regula/documentreader/JSONConstructor.java +171 -1389
- package/android/src/main/java/com/regula/documentreader/RNRegulaDocumentReaderModule.java +111 -26
- package/android/src/main/java/com/regula/documentreader/RegulaConfig.java +68 -7
- package/example/App.js +170 -168
- package/example/android/app/build.gradle +0 -6
- package/example/android/app/src/main/AndroidManifest.xml +2 -0
- package/example/android/build.gradle +5 -10
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/ios/Podfile +8 -0
- package/example/metro.config.js +10 -8
- package/example/package.json +2 -2
- package/index.d.ts +3552 -3393
- package/index.js +3361 -3247
- package/ios/RGLWJSONConstructor.h +7 -0
- package/ios/RGLWJSONConstructor.m +124 -4
- package/ios/RNRegulaDocumentReader.m +85 -35
- package/ios/RegulaConfig.m +62 -7
- package/package.json +1 -1
package/example/App.js
CHANGED
|
@@ -3,7 +3,7 @@ import { StyleSheet, View, Button, Text, Image, ScrollView, NativeEventEmitter,
|
|
|
3
3
|
import DocumentReader, { Enum, DocumentReaderCompletion, DocumentReaderScenario, RNRegulaDocumentReader } from '@regulaforensics/react-native-document-reader-api'
|
|
4
4
|
import * as RNFS from 'react-native-fs'
|
|
5
5
|
import RadioGroup from 'react-native-radio-buttons-group'
|
|
6
|
-
import {
|
|
6
|
+
import { launchImageLibrary } from 'react-native-image-picker';
|
|
7
7
|
import * as Progress from 'react-native-progress'
|
|
8
8
|
import CheckBox from 'react-native-check-box'
|
|
9
9
|
import { LogBox } from 'react-native';
|
|
@@ -16,197 +16,192 @@ var certDir = Platform.OS === 'ios' ? (RNFS.MainBundlePath + "/certificates") :
|
|
|
16
16
|
var readDir = Platform.OS === 'ios' ? RNFS.readDir : RNFS.readDirAssets
|
|
17
17
|
var readFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets
|
|
18
18
|
|
|
19
|
+
var isReadingRfid = false;
|
|
20
|
+
|
|
19
21
|
async function addCertificates() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
var certificates = []
|
|
23
|
+
var items = await readDir(certDir, 'base64')
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
for (var i in items) {
|
|
26
|
+
var item = items[i]
|
|
27
|
+
if (item.isFile()) {
|
|
28
|
+
var findExt = item.name.split('.')
|
|
29
|
+
var pkdResourceType = 0
|
|
30
|
+
if (findExt.length > 0)
|
|
31
|
+
pkdResourceType = Enum.PKDResourceType.getType(findExt[findExt.length - 1].toLowerCase())
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
33
|
+
var file = await readFile(item.path, 'base64')
|
|
34
|
+
certificates.push({
|
|
35
|
+
'binaryData': file,
|
|
36
|
+
'resourceType': pkdResourceType
|
|
37
|
+
})
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
}
|
|
40
|
+
DocumentReader.addPKDCertificates(certificates, s => {
|
|
41
|
+
console.log("certificates added")
|
|
42
|
+
}, e => console.log(e))
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export default class App extends Component {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
this.setState({ fullName: "Ready" })
|
|
91
|
-
DocumentReader.setRfidDelegate(Enum.RFIDDelegate.NO_PA, (r) => {}, error => console.log(error))
|
|
92
|
-
// addCertificates()
|
|
93
|
-
} else
|
|
94
|
-
this.setState({ fullName: "Failed" })
|
|
95
|
-
}, error => console.log(error))
|
|
96
|
-
}, error => console.log(error))
|
|
97
|
-
}, error => console.log(error))
|
|
46
|
+
constructor(props) {
|
|
47
|
+
super(props)
|
|
48
|
+
eventManager.addListener('prepareDatabaseProgressChangeEvent', e => this.setState({ fullName: "Downloading database: " + e["msg"] + "%" }))
|
|
49
|
+
eventManager.addListener('completionEvent', e => this.handleCompletion(DocumentReaderCompletion.fromJson(JSON.parse(e["msg"]))))
|
|
50
|
+
eventManager.addListener('rfidNotificationCompletionEvent', e => console.log("rfidNotificationCompletionEvent: " + e["msg"]))
|
|
51
|
+
eventManager.addListener('paCertificateCompletionEvent', e => console.log("paCertificateCompletionEvent: " + e["msg"]))
|
|
52
|
+
DocumentReader.prepareDatabase("Full", (respond) => {
|
|
53
|
+
console.log(respond)
|
|
54
|
+
readFile(licPath, 'base64').then((res) => {
|
|
55
|
+
this.setState({ fullName: "Initializing..." })
|
|
56
|
+
DocumentReader.initializeReader({
|
|
57
|
+
license: res,
|
|
58
|
+
delayedNNLoad: true
|
|
59
|
+
}, (respond) => {
|
|
60
|
+
console.log(respond)
|
|
61
|
+
DocumentReader.isRFIDAvailableForUse((canRfid) => {
|
|
62
|
+
if (canRfid) {
|
|
63
|
+
this.setState({ canRfid: true, rfidUIHeader: "Reading RFID", rfidDescription: "Place your phone on top of the NFC tag", rfidUIHeaderColor: "black" })
|
|
64
|
+
this.setState({ canRfidTitle: '' })
|
|
65
|
+
}
|
|
66
|
+
}, error => console.log(error))
|
|
67
|
+
DocumentReader.getAvailableScenarios((jstring) => {
|
|
68
|
+
var scenariosTemp = JSON.parse(jstring)
|
|
69
|
+
var scenariosL = []
|
|
70
|
+
for (var i in scenariosTemp) {
|
|
71
|
+
scenariosL.push({
|
|
72
|
+
label: DocumentReaderScenario.fromJson(typeof scenariosTemp[i] === "string" ? JSON.parse(scenariosTemp[i]) : scenariosTemp[i]).name,
|
|
73
|
+
id: i
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
this.setState({ scenarios: scenariosL })
|
|
77
|
+
this.setState({ selectedScenario: this.state.scenarios[0]['label'] })
|
|
78
|
+
this.setState({ radio: null })
|
|
79
|
+
this.setState({
|
|
80
|
+
radio: < RadioGroup containerStyle={styles.radio}
|
|
81
|
+
radioButtons={this.state.scenarios}
|
|
82
|
+
onPress={
|
|
83
|
+
(data) => {
|
|
84
|
+
var selectedItem
|
|
85
|
+
for (var index in data)
|
|
86
|
+
if (data[index]['selected'])
|
|
87
|
+
selectedItem = data[index]['label']
|
|
88
|
+
this.setState({ selectedScenario: selectedItem })
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/>
|
|
98
92
|
})
|
|
93
|
+
DocumentReader.getDocumentReaderIsReady((isReady) => {
|
|
94
|
+
if (isReady) {
|
|
95
|
+
this.setState({ fullName: "Ready" })
|
|
96
|
+
DocumentReader.setRfidDelegate(Enum.RFIDDelegate.NO_PA, (r) => { }, error => console.log(error))
|
|
97
|
+
// addCertificates()
|
|
98
|
+
} else
|
|
99
|
+
this.setState({ fullName: "Failed" })
|
|
100
|
+
}, error => console.log(error))
|
|
101
|
+
}, error => console.log(error))
|
|
99
102
|
}, error => console.log(error))
|
|
103
|
+
})
|
|
104
|
+
}, error => console.log(error))
|
|
100
105
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
this.state = {
|
|
107
|
+
fullName: "Please wait...",
|
|
108
|
+
doRfid: false,
|
|
109
|
+
isReadingRfidCustomUi: false,
|
|
110
|
+
canRfid: false,
|
|
111
|
+
canRfidTitle: '(unavailable)',
|
|
112
|
+
scenarios: [],
|
|
113
|
+
selectedScenario: "",
|
|
114
|
+
portrait: require('./images/portrait.png'),
|
|
115
|
+
docFront: require('./images/id.png'),
|
|
116
|
+
radio: < RadioGroup containerStyle={styles.radio}
|
|
117
|
+
radioButtons={
|
|
118
|
+
[{ label: 'Loading', id: 0 }]}
|
|
119
|
+
onPress={null}
|
|
120
|
+
/>
|
|
116
121
|
}
|
|
122
|
+
}
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
124
|
+
handleCompletion(completion) {
|
|
125
|
+
if (this.state.isReadingRfidCustomUi && (completion.action === Enum.DocReaderAction.CANCEL || completion.action === Enum.DocReaderAction.ERROR))
|
|
126
|
+
this.hideRfidUI()
|
|
127
|
+
if (this.state.isReadingRfidCustomUi && completion.action === Enum.DocReaderAction.NOTIFICATION)
|
|
128
|
+
this.updateRfidUI(completion.results.documentReaderNotification)
|
|
129
|
+
if (completion.action === Enum.DocReaderAction.COMPLETE)
|
|
130
|
+
if (this.state.isReadingRfidCustomUi)
|
|
131
|
+
if (completion.results.rfidResult !== 1)
|
|
132
|
+
this.restartRfidUI()
|
|
133
|
+
else {
|
|
134
|
+
this.hideRfidUI()
|
|
135
|
+
this.displayResults(completion.results)
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
this.handleResults(completion.results)
|
|
139
|
+
if (completion.action === Enum.DocReaderAction.TIMEOUT)
|
|
140
|
+
this.handleResults(completion.results)
|
|
141
|
+
if (completion.action === Enum.DocReaderAction.CANCEL || completion.action === Enum.DocReaderAction.ERROR)
|
|
142
|
+
isReadingRfid = false
|
|
143
|
+
}
|
|
134
144
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
showRfidUI() {
|
|
146
|
+
// show animation
|
|
147
|
+
this.setState({ isReadingRfidCustomUi: true })
|
|
148
|
+
}
|
|
139
149
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
hideRfidUI() {
|
|
151
|
+
// show animation
|
|
152
|
+
this.restartRfidUI()
|
|
153
|
+
this.setState({ isReadingRfidCustomUi: false, rfidUIHeader: "Reading RFID", rfidUIHeaderColor: "black" })
|
|
154
|
+
}
|
|
145
155
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
156
|
+
restartRfidUI() {
|
|
157
|
+
this.setState({ rfidUIHeaderColor: "red", rfidUIHeader: "Failed!", rfidDescription: "Place your phone on top of the NFC tag", rfidProgress: -1 })
|
|
158
|
+
}
|
|
149
159
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
updateRfidUI(results) {
|
|
161
|
+
if (results.code === Enum.eRFID_NotificationCodes.RFID_NOTIFICATION_PCSC_READING_DATAGROUP)
|
|
162
|
+
this.setState({ rfidDescription: Enum.eRFID_DataFile_Type.getTranslation(results.number) })
|
|
163
|
+
this.setState({ rfidUIHeader: "Reading RFID", rfidUIHeaderColor: "black", rfidProgress: results.value / 100 })
|
|
164
|
+
if (Platform.OS === 'ios')
|
|
165
|
+
DocumentReader.setRfidSessionStatus(this.state.rfidDescription + "\n" + results.value + "%", e => { }, e => { })
|
|
166
|
+
}
|
|
157
167
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
168
|
+
clearResults() {
|
|
169
|
+
this.setState({ fullName: "Ready", docFront: require('./images/id.png'), portrait: require('./images/portrait.png') })
|
|
170
|
+
}
|
|
161
171
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
172
|
+
displayResults(results) {
|
|
173
|
+
if(results == null) return
|
|
174
|
+
this.setState({ fullName: results.getTextFieldValueByType({ fieldType: Enum.eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES }) })
|
|
175
|
+
if (results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE }) != null)
|
|
176
|
+
this.setState({ docFront: { uri: "data:image/png;base64," + results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_DOCUMENT_IMAGE }) } })
|
|
177
|
+
if (results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_PORTRAIT }) != null)
|
|
178
|
+
this.setState({ portrait: { uri: "data:image/png;base64," + results.getGraphicFieldImageByType({ fieldType: Enum.eGraphicFieldType.GF_PORTRAIT }) } })
|
|
179
|
+
}
|
|
169
180
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
customRFID() {
|
|
182
|
+
this.showRfidUI()
|
|
183
|
+
DocumentReader.readRFID(e => { }, e => { })
|
|
184
|
+
}
|
|
174
185
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
186
|
+
usualRFID() {
|
|
187
|
+
isReadingRfid = true
|
|
188
|
+
DocumentReader.startRFIDReader(e => { }, e => { })
|
|
189
|
+
}
|
|
179
190
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
mrz: accessKey,
|
|
188
|
-
pacePasswordType: Enum.eRFID_Password_Type.PPT_MRZ,
|
|
189
|
-
}, e => {}, error => console.log(error))
|
|
190
|
-
} else {
|
|
191
|
-
accessKey = null
|
|
192
|
-
accessKey = results.getTextFieldValueByType(159)
|
|
193
|
-
if (accessKey != null && accessKey != "") {
|
|
194
|
-
DocumentReader.setRfidScenario({
|
|
195
|
-
password: accessKey,
|
|
196
|
-
pacePasswordType: Enum.eRFID_Password_Type.PPT_CAN,
|
|
197
|
-
}, e => {}, error => console.log(error))
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// this.customRFID()
|
|
201
|
-
this.usualRFID()
|
|
202
|
-
} else
|
|
203
|
-
this.displayResults(results)
|
|
191
|
+
handleResults(results) {
|
|
192
|
+
if (this.state.doRfid && !isReadingRfid && results != null && results.chipPage != 0) {
|
|
193
|
+
// this.customRFID()
|
|
194
|
+
this.usualRFID()
|
|
195
|
+
} else {
|
|
196
|
+
isReadingRfid = false
|
|
197
|
+
this.displayResults(results)
|
|
204
198
|
}
|
|
199
|
+
}
|
|
205
200
|
|
|
206
201
|
render() {
|
|
207
202
|
return (
|
|
208
203
|
<View style={styles.container}>
|
|
209
|
-
{(this.state.
|
|
204
|
+
{(this.state.isReadingRfidCustomUi && Platform.OS === 'android') && <View style={styles.container}>
|
|
210
205
|
<Text style={{ paddingBottom: 30, fontSize: 23, color: this.state.rfidUIHeaderColor }}>{this.state.rfidUIHeader}</Text>
|
|
211
206
|
<Text style={{ paddingBottom: 50, fontSize: 20 }}>{this.state.rfidDescription}</Text>
|
|
212
207
|
<Progress.Bar width={200} useNativeDriver={true} color="#4285F4" progress={this.state.rfidProgress} />
|
|
@@ -215,7 +210,8 @@ export default class App extends Component {
|
|
|
215
210
|
</TouchableOpacity>
|
|
216
211
|
</View>
|
|
217
212
|
}
|
|
218
|
-
{!this.state.
|
|
213
|
+
{!this.state.isReadingRfidCustomUi && <View style={styles.container}>
|
|
214
|
+
<Text/><Text/>
|
|
219
215
|
<Text style={{
|
|
220
216
|
top: 1,
|
|
221
217
|
left: 1,
|
|
@@ -275,7 +271,13 @@ export default class App extends Component {
|
|
|
275
271
|
}}
|
|
276
272
|
disabled={!this.state.canRfid}
|
|
277
273
|
/>
|
|
278
|
-
<Text
|
|
274
|
+
<Text
|
|
275
|
+
style={{ padding: 5 }}
|
|
276
|
+
onPress={() => {
|
|
277
|
+
if (this.state.canRfid) {
|
|
278
|
+
this.setState({ doRfid: !this.state.doRfid })
|
|
279
|
+
}
|
|
280
|
+
}}>
|
|
279
281
|
{'Process rfid reading' + this.state.canRfidTitle}
|
|
280
282
|
</Text>
|
|
281
283
|
</View>
|
|
@@ -15,14 +15,8 @@ def enableHermes = project.ext.react.get("enableHermes", false);
|
|
|
15
15
|
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
|
-
ndkVersion rootProject.ext.ndkVersion
|
|
19
|
-
|
|
20
18
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
21
19
|
|
|
22
|
-
compileOptions {
|
|
23
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
24
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
25
|
-
}
|
|
26
20
|
defaultConfig {
|
|
27
21
|
applicationId "com.regula.dr.fullrfid"
|
|
28
22
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
2
|
package="com.regula.dr.fullrfid">
|
|
3
3
|
|
|
4
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
5
|
+
<uses-permission android:name="android.permission.BLUETOOTH_SCAN" />
|
|
4
6
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
7
|
<uses-permission android:name="android.permission.NFC" />
|
|
6
8
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
|
|
3
1
|
buildscript {
|
|
4
2
|
ext {
|
|
5
|
-
buildToolsVersion = "
|
|
3
|
+
buildToolsVersion = "33.0.0"
|
|
6
4
|
minSdkVersion = 21
|
|
7
|
-
compileSdkVersion =
|
|
8
|
-
targetSdkVersion =
|
|
9
|
-
ndkVersion = "21.4.7075529"
|
|
5
|
+
compileSdkVersion = 33
|
|
6
|
+
targetSdkVersion = 33
|
|
10
7
|
}
|
|
11
8
|
repositories {
|
|
12
9
|
google()
|
|
13
10
|
mavenCentral()
|
|
14
11
|
}
|
|
15
12
|
dependencies {
|
|
16
|
-
classpath(
|
|
13
|
+
classpath('com.android.tools.build:gradle:7.2.2')
|
|
14
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
|
|
@@ -21,13 +19,10 @@ allprojects {
|
|
|
21
19
|
repositories {
|
|
22
20
|
mavenCentral()
|
|
23
21
|
mavenLocal()
|
|
24
|
-
|
|
25
22
|
maven {
|
|
26
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
27
23
|
url("$rootDir/../node_modules/react-native/android")
|
|
28
24
|
}
|
|
29
25
|
maven {
|
|
30
|
-
// Android JSC is installed from npm
|
|
31
26
|
url("$rootDir/../node_modules/jsc-android/dist")
|
|
32
27
|
}
|
|
33
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
|
4
4
|
zipStoreBase=GRADLE_USER_HOME
|
|
5
5
|
zipStorePath=wrapper/dists
|
package/example/ios/Podfile
CHANGED
|
@@ -20,5 +20,13 @@ target 'DocumentReader' do
|
|
|
20
20
|
post_install do |installer|
|
|
21
21
|
react_native_post_install(installer)
|
|
22
22
|
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
23
|
+
|
|
24
|
+
installer.pods_project.targets.each do |target|
|
|
25
|
+
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
|
|
26
|
+
target.build_configurations.each do |config|
|
|
27
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
23
31
|
end
|
|
24
32
|
end
|
package/example/metro.config.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const folders = [
|
|
3
|
+
"../",
|
|
4
|
+
path.resolve(path.join(__dirname, './node_modules'))
|
|
5
|
+
];
|
|
8
6
|
module.exports = {
|
|
9
7
|
transformer: {
|
|
10
8
|
getTransformOptions: async () => ({
|
|
@@ -14,4 +12,8 @@ module.exports = {
|
|
|
14
12
|
},
|
|
15
13
|
}),
|
|
16
14
|
},
|
|
17
|
-
|
|
15
|
+
resolver: {
|
|
16
|
+
nodeModulesPaths: folders
|
|
17
|
+
},
|
|
18
|
+
watchFolders: folders,
|
|
19
|
+
};
|
package/example/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"lint": "eslint ."
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullrfid": "
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "6.6.0",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullrfid": "6.6.0",
|
|
15
15
|
"react": "17.0.2",
|
|
16
16
|
"react-native": "^0.67.0",
|
|
17
17
|
"react-native-check-box": "^2.1.7",
|