Initialization
This page covers the description of the initialization process
The DocumentReader initialization works fully offline. It simply use license file, which you can get here: licensing.regulaforensics.com. You should add the regula.license file to your project.
1
var licPath = Platform.OS === 'ios' ? (RNFS.MainBundlePath + "/regula.license") : "regula.license";
2
var readFile = Platform.OS === 'ios' ? RNFS.readFile : RNFS.readFileAssets;
3
4
readFile(licPath, 'base64').then((res) => {
5
DocumentReader.initializeReader(res, (respond) => {
6
console.log(respond);
7
8
DocumentReader.getDocumentReaderIsReady((isReady) => {
9
if (isReady === true || isReady === "YES")
10
this.setState({ fullName: "Successfull" });
11
else
12
this.setState({ fullName: "Error" });
13
}, error => console.log(error));
14
}, error => console.log(error));
15
});
Copied!
Last modified 4mo ago
Copy link