@regulaforensics/document-reader 9.9.1101-rc → 9.9.1116-beta
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/Package.swift +27 -0
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/examples/capacitor/package.json +1 -1
- package/examples/ionic/config.xml +1 -1
- package/examples/ionic/package.json +1 -1
- package/examples/ionic-cocoapods/README.md +22 -0
- package/examples/ionic-cocoapods/angular.json +39 -0
- package/examples/ionic-cocoapods/assets/.gitkeep +0 -0
- package/examples/ionic-cocoapods/config.xml +63 -0
- package/examples/ionic-cocoapods/images/document.png +0 -0
- package/examples/ionic-cocoapods/images/icon.png +0 -0
- package/examples/ionic-cocoapods/images/portrait.png +0 -0
- package/examples/ionic-cocoapods/index.html +19 -0
- package/examples/ionic-cocoapods/index.tsx +58 -0
- package/examples/ionic-cocoapods/ionic.config.json +7 -0
- package/examples/ionic-cocoapods/package-lock.json +16579 -0
- package/examples/ionic-cocoapods/package.json +58 -0
- package/examples/ionic-cocoapods/scripts/android.sh +8 -0
- package/examples/ionic-cocoapods/scripts/ios.sh +8 -0
- package/examples/ionic-cocoapods/scripts/setup.sh +8 -0
- package/examples/ionic-cocoapods/src/extra/bt_device.tsx +33 -0
- package/examples/ionic-cocoapods/src/extra/custom_rfid.tsx +61 -0
- package/examples/ionic-cocoapods/src/main.css +148 -0
- package/examples/ionic-cocoapods/src/main.html +38 -0
- package/examples/ionic-cocoapods/src/main.tsx +172 -0
- package/examples/ionic-cocoapods/tsconfig.json +14 -0
- package/examples/react_native/app.config.ts +1 -2
- package/examples/react_native/package.json +10 -11
- package/package.json +1 -1
- package/plugin.xml +11 -11
- package/react-native-document-reader.podspec +14 -0
- package/test/package-lock.json +1 -1
- package/RNDocumentReader.podspec +0 -21
- /package/{ios → Sources/document-reader}/CVDDocumentReader.m +0 -0
- /package/{ios → Sources/document-reader}/RGLWConfig.m +0 -0
- /package/{ios → Sources/document-reader}/RGLWJSONConstructor.m +0 -0
- /package/{ios → Sources/document-reader}/RGLWMain.m +0 -0
- /package/{ios → Sources/document-reader/include/document-reader}/CVDDocumentReader.h +0 -0
- /package/{ios → Sources/document-reader/include/document-reader}/RGLWConfig.h +0 -0
- /package/{ios → Sources/document-reader/include/document-reader}/RGLWJSONConstructor.h +0 -0
- /package/{ios → Sources/document-reader/include/document-reader}/RGLWMain.h +0 -0
package/Package.swift
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
|
|
3
|
+
import PackageDescription
|
|
4
|
+
|
|
5
|
+
let package = Package(
|
|
6
|
+
name: "@regulaforensics/document-reader",
|
|
7
|
+
platforms: [.iOS(.v15)],
|
|
8
|
+
products: [.library(name: "@regulaforensics/document-reader", targets: ["@regulaforensics/document-reader"])],
|
|
9
|
+
dependencies: [
|
|
10
|
+
.package(url: "https://github.com/apache/cordova-ios.git", branch: "master"),
|
|
11
|
+
.package(
|
|
12
|
+
url: "https://github.com/regulaforensics/DocumentReader-Swift-Package",
|
|
13
|
+
exact: "9.8.6944"
|
|
14
|
+
)
|
|
15
|
+
],
|
|
16
|
+
targets: [
|
|
17
|
+
.target(
|
|
18
|
+
name: "@regulaforensics/document-reader",
|
|
19
|
+
dependencies: [
|
|
20
|
+
.product(name: "Cordova", package: "cordova-ios"),
|
|
21
|
+
.product(name: "DocumentReader", package: "DocumentReader-Swift-Package")
|
|
22
|
+
],
|
|
23
|
+
path: "Sources/document-reader",
|
|
24
|
+
cSettings: [.headerSearchPath("include/document-reader")]
|
|
25
|
+
)
|
|
26
|
+
]
|
|
27
|
+
)
|
package/android/build.gradle
CHANGED
|
@@ -20,7 +20,7 @@ android {
|
|
|
20
20
|
rootProject.allprojects {
|
|
21
21
|
repositories {
|
|
22
22
|
maven {
|
|
23
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader
|
|
23
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -29,7 +29,7 @@ dependencies {
|
|
|
29
29
|
//noinspection GradleDynamicVersion
|
|
30
30
|
implementation 'com.facebook.react:react-native:+'
|
|
31
31
|
//noinspection GradleDependency
|
|
32
|
-
implementation('com.regula.documentreader:api:9.
|
|
32
|
+
implementation('com.regula.documentreader:api:9.8.13324'){
|
|
33
33
|
transitive = true
|
|
34
34
|
}
|
|
35
35
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
repositories {
|
|
2
2
|
maven {
|
|
3
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader
|
|
3
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
dependencies {
|
|
8
8
|
//noinspection GradleDependency
|
|
9
|
-
implementation('com.regula.documentreader:api:9.
|
|
9
|
+
implementation('com.regula.documentreader:api:9.8.13324'){
|
|
10
10
|
transitive = true
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/document-reader": "9.9.
|
|
9
|
+
"@regulaforensics/document-reader": "9.9.1116-beta",
|
|
10
10
|
"@regulaforensics/document-reader-core-fullauthrfid": "9.8.2974",
|
|
11
11
|
"@regulaforensics/document-reader-btdevice": "9.8.68",
|
|
12
12
|
"@awesome-cordova-plugins/file": "^8.1.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</platform>
|
|
19
19
|
<platform name="ios">
|
|
20
20
|
<resource-file src="assets/db.dat" />
|
|
21
|
-
<preference name="deployment-target" value="
|
|
21
|
+
<preference name="deployment-target" value="15.0" />
|
|
22
22
|
<preference name="orientation" value="portrait" />
|
|
23
23
|
<allow-intent href="itms:*" />
|
|
24
24
|
<allow-intent href="itms-apps:*" />
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@ionic/cordova-builders": "^12.3.0",
|
|
20
20
|
"@awesome-cordova-plugins/camera": "^9.2.0",
|
|
21
21
|
"@awesome-cordova-plugins/file": "^9.2.0",
|
|
22
|
-
"@regulaforensics/document-reader": "9.9.
|
|
22
|
+
"@regulaforensics/document-reader": "9.9.1116-beta",
|
|
23
23
|
"@regulaforensics/document-reader-core-fullauthrfid": "9.8.2974",
|
|
24
24
|
"@regulaforensics/document-reader-btdevice": "9.8.68",
|
|
25
25
|
"cordova-android": "^15.0.0",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Regula Document Reader Ionic demo application
|
|
2
|
+
|
|
3
|
+
## How to build demo application
|
|
4
|
+
1. Download or the clone current repository using the command `git clone https://github.com/regulaforensics/npm-document-reader.git`.
|
|
5
|
+
2. Put `regula.license` file at `assets/` (you can get a trial license [here](https://client.regulaforensics.com)).
|
|
6
|
+
3. Put `db.dat` file at `assets/` (you can get a trial database [here](https://client.regulaforensics.com/customer/databases))
|
|
7
|
+
4. Execute `npm run setup` within this directory.
|
|
8
|
+
5. Run the app:
|
|
9
|
+
* IOS: `npm run ios`.
|
|
10
|
+
* Android: `npm run android`.
|
|
11
|
+
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-o` or `--open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
|
+
|
|
14
|
+
## Additional examples
|
|
15
|
+
|
|
16
|
+
### Bluetooth device
|
|
17
|
+
|
|
18
|
+
In order to connect to an external scanning device, change the `useBtDevice` constant to true in `src/extra/bt_device`, and set `btDeviceName` to the name of your device. After running the app, click `Connect`.
|
|
19
|
+
|
|
20
|
+
### RFID self hosted UI
|
|
21
|
+
|
|
22
|
+
This app also demonstraits how you can implement your own UI for the RFID reading process. To enable it, change the `useRfidSelfHostedUI` constant to true in `src/extra/custom_rfid`. Run the app and initiate RFID reading.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"projects": {
|
|
4
|
+
"app": {
|
|
5
|
+
"root": "",
|
|
6
|
+
"sourceRoot": "src",
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"architect": {
|
|
9
|
+
"build": {
|
|
10
|
+
"builder": "@angular-devkit/build-angular:browser",
|
|
11
|
+
"options": {
|
|
12
|
+
"outputPath": "www",
|
|
13
|
+
"index": "index.html",
|
|
14
|
+
"main": "index.tsx",
|
|
15
|
+
"tsConfig": "tsconfig.json",
|
|
16
|
+
"assets": [
|
|
17
|
+
{
|
|
18
|
+
"glob": "**/*",
|
|
19
|
+
"input": "assets",
|
|
20
|
+
"output": "assets"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"glob": "**/*",
|
|
24
|
+
"input": "images",
|
|
25
|
+
"output": "images"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"ionic-cordova-build": {
|
|
31
|
+
"builder": "@ionic/cordova-builders:cordova-build",
|
|
32
|
+
"options": {
|
|
33
|
+
"browserTarget": "app:build"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
+
<widget android-packageName="com.regula.example.dr.ionic" ios-CFBundleIdentifier="com.regula.example.dr.ionic" version="1.0.0"
|
|
3
|
+
xmlns:android="http://schemas.android.com/apk/res/android">
|
|
4
|
+
<name>Document</name>
|
|
5
|
+
<icon src="images/icon.png" />
|
|
6
|
+
<platform name="android">
|
|
7
|
+
<resource-file src="assets/db.dat" target="app/src/main/assets/Regula/db.dat" />
|
|
8
|
+
<preference name="orientation" value="portrait" />
|
|
9
|
+
<preference name="AndroidEdgeToEdge" value="true" />
|
|
10
|
+
<preference name="android-minSdkVersion" value="24" />
|
|
11
|
+
<preference name="android-targetSdkVersion" value="36" />
|
|
12
|
+
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
13
|
+
<config-file parent="/*" target="AndroidManifest.xml">
|
|
14
|
+
<uses-permission android:name="android.permission.NFC" />
|
|
15
|
+
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
|
16
|
+
</config-file>
|
|
17
|
+
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
|
|
18
|
+
<application android:usesCleartextTraffic="true" />
|
|
19
|
+
</edit-config>
|
|
20
|
+
</platform>
|
|
21
|
+
<platform name="ios">
|
|
22
|
+
<resource-file src="assets/db.dat" />
|
|
23
|
+
<preference name="deployment-target" value="15.0" />
|
|
24
|
+
<preference name="orientation" value="portrait" />
|
|
25
|
+
<allow-intent href="itms:*" />
|
|
26
|
+
<allow-intent href="itms-apps:*" />
|
|
27
|
+
<config-file parent="NSCameraUsageDescription" target="*-Info.plist">
|
|
28
|
+
<string>To use camera</string>
|
|
29
|
+
</config-file>
|
|
30
|
+
<config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist">
|
|
31
|
+
<string>To pick images</string>
|
|
32
|
+
</config-file>
|
|
33
|
+
<config-file parent="NSBluetoothAlwaysUsageDescription" target="*-Info.plist">
|
|
34
|
+
<string>To use btdevice</string>
|
|
35
|
+
</config-file>
|
|
36
|
+
<config-file parent="NFCReaderUsageDescription" target="*-Info.plist">
|
|
37
|
+
<string>To use NFC</string>
|
|
38
|
+
</config-file>
|
|
39
|
+
<config-file parent="com.apple.developer.nfc.readersession.iso7816.select-identifiers" target="*-Info.plist">
|
|
40
|
+
<array>
|
|
41
|
+
<string>A0000002471001</string>
|
|
42
|
+
<string>E80704007F00070302</string>
|
|
43
|
+
<string>A000000167455349474E</string>
|
|
44
|
+
<string>A0000002480100</string>
|
|
45
|
+
<string>A0000002480200</string>
|
|
46
|
+
<string>A0000002480300</string>
|
|
47
|
+
<string>A0000002480400</string>
|
|
48
|
+
<string>A00000045645444C2D3031</string>
|
|
49
|
+
<string>D2760000850101</string>
|
|
50
|
+
</array>
|
|
51
|
+
</config-file>
|
|
52
|
+
<config-file parent="com.apple.developer.nfc.readersession.formats" target="*-Debug.plist">
|
|
53
|
+
<array>
|
|
54
|
+
<string>TAG</string>
|
|
55
|
+
</array>
|
|
56
|
+
</config-file>
|
|
57
|
+
<config-file parent="com.apple.developer.nfc.readersession.formats" target="*-Release.plist">
|
|
58
|
+
<array>
|
|
59
|
+
<string>TAG</string>
|
|
60
|
+
</array>
|
|
61
|
+
</config-file>
|
|
62
|
+
</platform>
|
|
63
|
+
</widget>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<head>
|
|
2
|
+
<meta name="viewport"
|
|
3
|
+
content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
4
|
+
<base href="/" />
|
|
5
|
+
</head>
|
|
6
|
+
|
|
7
|
+
<body>
|
|
8
|
+
<ion-app>
|
|
9
|
+
<app-root></app-root>
|
|
10
|
+
</ion-app>
|
|
11
|
+
</body>
|
|
12
|
+
|
|
13
|
+
<style>
|
|
14
|
+
html,
|
|
15
|
+
body {
|
|
16
|
+
height: 100%;
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import 'zone.js';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
|
|
3
|
+
import { BrowserModule } from '@angular/platform-browser'
|
|
4
|
+
import { IonicModule, Platform } from '@ionic/angular'
|
|
5
|
+
import { NgModule } from '@angular/core'
|
|
6
|
+
|
|
7
|
+
import { Component } from '@angular/core'
|
|
8
|
+
import { File } from '@awesome-cordova-plugins/file'
|
|
9
|
+
import { Camera, DestinationType, MediaType, PictureSourceType } from '@awesome-cordova-plugins/camera/ngx'
|
|
10
|
+
|
|
11
|
+
import { main } from './src/main'
|
|
12
|
+
|
|
13
|
+
export async function loadAsset(path: string): Promise<string> {
|
|
14
|
+
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "www/assets")
|
|
15
|
+
var fileEntry = await File.getFile(dir, path, null)
|
|
16
|
+
var result = await new Promise<string>((resolve, _) => {
|
|
17
|
+
fileEntry.file(file => {
|
|
18
|
+
var reader = new FileReader()
|
|
19
|
+
reader.onloadend = (_) => resolve(reader.result as string)
|
|
20
|
+
reader.readAsDataURL(file)
|
|
21
|
+
})
|
|
22
|
+
})
|
|
23
|
+
return result
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export async function pickImage(): Promise<string | null> {
|
|
27
|
+
return await cameraInstance.getPicture({
|
|
28
|
+
destinationType: DestinationType.DATA_URL,
|
|
29
|
+
mediaType: MediaType.PICTURE,
|
|
30
|
+
sourceType: PictureSourceType.PHOTOLIBRARY
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var cameraInstance: Camera
|
|
35
|
+
@Component({
|
|
36
|
+
selector: 'app-root',
|
|
37
|
+
templateUrl: 'src/main.html',
|
|
38
|
+
styleUrl: 'src/main.css'
|
|
39
|
+
})
|
|
40
|
+
class Main {
|
|
41
|
+
constructor(platform: Platform, camera: Camera) {
|
|
42
|
+
(async () => {
|
|
43
|
+
cameraInstance = camera
|
|
44
|
+
await platform.ready()
|
|
45
|
+
await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))
|
|
46
|
+
main()
|
|
47
|
+
})()
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@NgModule({
|
|
52
|
+
bootstrap: [Main],
|
|
53
|
+
providers: [Platform, Camera],
|
|
54
|
+
imports: [BrowserModule, IonicModule.forRoot()]
|
|
55
|
+
})
|
|
56
|
+
class MainModule { }
|
|
57
|
+
|
|
58
|
+
platformBrowserDynamic().bootstrapModule(MainModule)
|