@regulaforensics/document-reader 9.9.1147-nightly → 9.9.1155-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.
Files changed (143) hide show
  1. package/Package.swift +28 -0
  2. package/README.md +3 -1
  3. package/android/CVDDocumentReader.kt +4 -3
  4. package/android/build.gradle.kts +37 -0
  5. package/android/cordova.gradle.kts +13 -0
  6. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/BluetoothUtil.kt +1 -1
  7. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/Config.kt +3 -3
  8. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/JSONConstructor.kt +4 -4
  9. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/Main.kt +3 -3
  10. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/RNDocumentReaderModule.kt +4 -3
  11. package/android/src/main/kotlin/com/regula/plugin/{documentreader → document/reader}/Utils.kt +1 -1
  12. package/app.plugin.js +10 -7
  13. package/examples/capacitor/README.md +2 -0
  14. package/examples/capacitor/android/app/build.gradle +1 -10
  15. package/examples/capacitor/android/app/src/main/AndroidManifest.xml +9 -0
  16. package/examples/capacitor/android/app/src/main/res/xml/file_paths.xml +5 -0
  17. package/examples/capacitor/android/build.gradle +12 -3
  18. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  19. package/examples/capacitor/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  20. package/examples/capacitor/android/gradle.properties +4 -0
  21. package/examples/capacitor/android/gradlew +4 -7
  22. package/examples/capacitor/android/gradlew.bat +12 -24
  23. package/examples/capacitor/android/variables.gradle +13 -9
  24. package/examples/capacitor/capacitor.config.json +15 -0
  25. package/examples/capacitor/index.tsx +15 -23
  26. package/examples/capacitor/ios/App/App/AppDelegate.swift +5 -40
  27. package/examples/capacitor/ios/App/App/Info.plist +19 -2
  28. package/examples/capacitor/ios/App/App/SceneDelegate.swift +23 -0
  29. package/examples/capacitor/ios/App/App.xcodeproj/project.pbxproj +30 -86
  30. package/examples/capacitor/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +1 -0
  31. package/examples/capacitor/package.json +13 -18
  32. package/examples/capacitor/scripts/android.sh +5 -8
  33. package/examples/capacitor/scripts/ios.sh +5 -7
  34. package/examples/capacitor/scripts/setup.sh +2 -7
  35. package/examples/capacitor/src/main.css +5 -0
  36. package/examples/capacitor/vite.config.ts +0 -12
  37. package/examples/capacitor-cocoapods/README.md +22 -0
  38. package/examples/capacitor-cocoapods/android/app/build.gradle +50 -0
  39. package/examples/capacitor-cocoapods/android/app/proguard-rules.pro +21 -0
  40. package/examples/capacitor-cocoapods/android/app/src/main/AndroidManifest.xml +27 -0
  41. package/examples/capacitor-cocoapods/android/app/src/main/assets/Regula/.gitkeep +0 -0
  42. package/examples/capacitor-cocoapods/android/app/src/main/java/com/regula/example/dr/capacitor/MainActivity.java +5 -0
  43. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/ic_launcher.png +0 -0
  44. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/ic_launcher_foreground.png +0 -0
  45. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/ic_launcher_round.png +0 -0
  46. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/launcher.xml +4 -0
  47. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/launcher_round.xml +4 -0
  48. package/examples/capacitor-cocoapods/android/app/src/main/res/drawable/splash.png +0 -0
  49. package/examples/capacitor-cocoapods/android/app/src/main/res/layout/activity_main.xml +12 -0
  50. package/examples/capacitor-cocoapods/android/app/src/main/res/values/styles.xml +22 -0
  51. package/examples/capacitor-cocoapods/android/build.gradle +30 -0
  52. package/examples/capacitor-cocoapods/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  53. package/examples/capacitor-cocoapods/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  54. package/examples/capacitor-cocoapods/android/gradle.properties +22 -0
  55. package/examples/capacitor-cocoapods/android/gradlew +251 -0
  56. package/examples/capacitor-cocoapods/android/gradlew.bat +94 -0
  57. package/examples/capacitor-cocoapods/android/settings.gradle +5 -0
  58. package/examples/capacitor-cocoapods/android/variables.gradle +16 -0
  59. package/examples/capacitor-cocoapods/index.html +5 -0
  60. package/examples/capacitor-cocoapods/index.tsx +39 -0
  61. package/examples/capacitor-cocoapods/ios/App/App/App.entitlements +10 -0
  62. package/examples/capacitor-cocoapods/ios/App/App/AppDelegate.swift +49 -0
  63. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  64. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +14 -0
  65. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/Contents.json +6 -0
  66. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +23 -0
  67. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  68. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  69. package/examples/capacitor-cocoapods/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  70. package/examples/capacitor-cocoapods/ios/App/App/Base.lproj/LaunchScreen.storyboard +32 -0
  71. package/examples/capacitor-cocoapods/ios/App/App/Info.plist +69 -0
  72. package/examples/capacitor-cocoapods/ios/App/App.xcodeproj/project.pbxproj +430 -0
  73. package/examples/capacitor-cocoapods/ios/App/App.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  74. package/examples/capacitor-cocoapods/package.json +30 -0
  75. package/examples/capacitor-cocoapods/public/assets/.gitkeep +0 -0
  76. package/examples/capacitor-cocoapods/public/images/document.png +0 -0
  77. package/examples/capacitor-cocoapods/public/images/portrait.png +0 -0
  78. package/examples/capacitor-cocoapods/scripts/android.sh +11 -0
  79. package/examples/capacitor-cocoapods/scripts/ios.sh +10 -0
  80. package/examples/capacitor-cocoapods/scripts/setup.sh +14 -0
  81. package/examples/capacitor-cocoapods/src/extra/bt_device.tsx +33 -0
  82. package/examples/capacitor-cocoapods/src/extra/custom_rfid.tsx +61 -0
  83. package/examples/capacitor-cocoapods/src/main.css +148 -0
  84. package/examples/capacitor-cocoapods/src/main.html +38 -0
  85. package/examples/capacitor-cocoapods/src/main.tsx +172 -0
  86. package/examples/capacitor-cocoapods/tsconfig.json +5 -0
  87. package/examples/capacitor-cocoapods/vite.config.ts +17 -0
  88. package/examples/ionic/README.md +2 -0
  89. package/examples/ionic/config.xml +1 -1
  90. package/examples/ionic/index.tsx +8 -3
  91. package/examples/ionic/package-lock.json +6014 -7521
  92. package/examples/ionic/package.json +24 -33
  93. package/examples/ionic/scripts/android.sh +0 -2
  94. package/examples/ionic/scripts/ios.sh +0 -2
  95. package/examples/ionic/scripts/setup.sh +0 -2
  96. package/examples/ionic/tsconfig.json +0 -1
  97. package/examples/ionic-cocoapods/README.md +22 -0
  98. package/examples/ionic-cocoapods/angular.json +39 -0
  99. package/examples/ionic-cocoapods/assets/.gitkeep +0 -0
  100. package/examples/ionic-cocoapods/config.xml +63 -0
  101. package/examples/ionic-cocoapods/images/document.png +0 -0
  102. package/examples/ionic-cocoapods/images/icon.png +0 -0
  103. package/examples/ionic-cocoapods/images/portrait.png +0 -0
  104. package/examples/ionic-cocoapods/index.html +19 -0
  105. package/examples/ionic-cocoapods/index.tsx +58 -0
  106. package/examples/ionic-cocoapods/ionic.config.json +7 -0
  107. package/examples/ionic-cocoapods/package-lock.json +16579 -0
  108. package/examples/ionic-cocoapods/package.json +58 -0
  109. package/examples/ionic-cocoapods/scripts/android.sh +8 -0
  110. package/examples/ionic-cocoapods/scripts/ios.sh +8 -0
  111. package/examples/ionic-cocoapods/scripts/setup.sh +8 -0
  112. package/examples/ionic-cocoapods/src/extra/bt_device.tsx +33 -0
  113. package/examples/ionic-cocoapods/src/extra/custom_rfid.tsx +61 -0
  114. package/examples/ionic-cocoapods/src/main.css +148 -0
  115. package/examples/ionic-cocoapods/src/main.html +38 -0
  116. package/examples/ionic-cocoapods/src/main.tsx +172 -0
  117. package/examples/ionic-cocoapods/tsconfig.json +14 -0
  118. package/examples/react_native/README.md +2 -0
  119. package/examples/react_native/app.config.ts +1 -2
  120. package/examples/react_native/package-lock.json +2018 -4031
  121. package/examples/react_native/package.json +14 -19
  122. package/examples/react_native/scripts/android.sh +3 -3
  123. package/examples/react_native/scripts/ios.sh +3 -3
  124. package/examples/react_native/scripts/setup.sh +4 -3
  125. package/ios/module.modulemap +7 -0
  126. package/package.json +1 -1
  127. package/plugin.xml +12 -12
  128. package/react-native-document-reader.podspec +14 -0
  129. package/test/package-lock.json +5 -2
  130. package/RNDocumentReader.podspec +0 -21
  131. package/android/build.gradle +0 -36
  132. package/android/cordova.gradle +0 -12
  133. package/examples/react_native/vendor/image-size-metro-compat/index.cjs +0 -16
  134. package/examples/react_native/vendor/image-size-metro-compat/package.json +0 -8
  135. /package/examples/{capacitor → capacitor-cocoapods}/android/app/capacitor.build.gradle +0 -0
  136. /package/examples/{capacitor → capacitor-cocoapods}/android/capacitor.settings.gradle +0 -0
  137. /package/examples/{capacitor → capacitor-cocoapods}/ionic.config.json +0 -0
  138. /package/examples/{capacitor → capacitor-cocoapods}/ios/App/App/Base.lproj/Main.storyboard +0 -0
  139. /package/examples/{capacitor → capacitor-cocoapods}/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -0
  140. /package/examples/{capacitor → capacitor-cocoapods}/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
  141. /package/examples/{capacitor → capacitor-cocoapods}/ios/App/Podfile +0 -0
  142. /package/examples/{capacitor → capacitor-cocoapods}/ios/App/Podfile.lock +0 -0
  143. /package/examples/{capacitor → capacitor-cocoapods}/package-lock.json +0 -0
@@ -2,6 +2,8 @@
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
4
  <dict>
5
+ <key>CAPACITOR_DEBUG</key>
6
+ <string>$(CAPACITOR_DEBUG)</string>
5
7
  <key>CFBundleDevelopmentRegion</key>
6
8
  <string>en</string>
7
9
  <key>CFBundleDisplayName</key>
@@ -37,8 +39,23 @@
37
39
  <string></string>
38
40
  <key>UILaunchStoryboardName</key>
39
41
  <string>LaunchScreen</string>
40
- <key>UIMainStoryboardFile</key>
41
- <string>Main</string>
42
+ <key>UIApplicationSceneManifest</key>
43
+ <dict>
44
+ <key>UIApplicationSupportsMultipleScenes</key>
45
+ <false/>
46
+ <key>UISceneConfigurations</key>
47
+ <dict>
48
+ <key>UIWindowSceneSessionRoleApplication</key>
49
+ <array>
50
+ <dict>
51
+ <key>UISceneConfigurationName</key>
52
+ <string>Default Configuration</string>
53
+ <key>UISceneDelegateClassName</key>
54
+ <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
55
+ </dict>
56
+ </array>
57
+ </dict>
58
+ </dict>
42
59
  <key>UIRequiredDeviceCapabilities</key>
43
60
  <array>
44
61
  <string>armv7</string>
@@ -0,0 +1,23 @@
1
+ import UIKit
2
+ import Capacitor
3
+
4
+ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
5
+ var window: UIWindow?
6
+
7
+ func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
8
+ guard let windowScene = scene as? UIWindowScene else { return }
9
+ window = UIWindow(windowScene: windowScene)
10
+ window?.rootViewController = CAPBridgeViewController()
11
+ window?.makeKeyAndVisible()
12
+
13
+ SceneDelegateProxy.shared.scene(scene, willConnectTo: session, options: connectionOptions)
14
+ }
15
+
16
+ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
17
+ SceneDelegateProxy.shared.scene(scene, openURLContexts: URLContexts)
18
+ }
19
+
20
+ func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
21
+ SceneDelegateProxy.shared.scene(scene, continue: userActivity)
22
+ }
23
+ }
@@ -3,36 +3,33 @@
3
3
  archiveVersion = 1;
4
4
  classes = {
5
5
  };
6
- objectVersion = 48;
6
+ objectVersion = 60;
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
+ 9582B6832FE993A70072D4E8 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9582B6822FE993A50072D4E8 /* SceneDelegate.swift */; };
11
+ 4D22ABE92AF431CB00220026 /* CapApp-SPM in Frameworks */ = {isa = PBXBuildFile; productRef = 4D22ABE82AF431CB00220026 /* CapApp-SPM */; };
10
12
  2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
11
13
  50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
12
14
  504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
13
- 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
14
15
  504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
15
16
  504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
16
17
  50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
17
- A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */; };
18
18
  C3C12F0D2DEDD3AA0068B75D /* db.dat in Resources */ = {isa = PBXBuildFile; fileRef = C3C12F0C2DEDD3AA0068B75D /* db.dat */; };
19
19
  /* End PBXBuildFile section */
20
20
 
21
21
  /* Begin PBXFileReference section */
22
+ 9582B6822FE993A50072D4E8 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
22
23
  2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
23
24
  34ADEF8A2B6C25C900B38C44 /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
24
25
  50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
25
26
  504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
26
27
  504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
27
- 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
28
28
  504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
29
29
  504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
30
30
  504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
31
31
  50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
32
- AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
33
- AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
34
32
  C3C12F0C2DEDD3AA0068B75D /* db.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = db.dat; sourceTree = "<group>"; };
35
- FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
36
33
  /* End PBXFileReference section */
37
34
 
38
35
  /* Begin PBXFrameworksBuildPhase section */
@@ -40,7 +37,7 @@
40
37
  isa = PBXFrameworksBuildPhase;
41
38
  buildActionMask = 2147483647;
42
39
  files = (
43
- A084ECDBA7D38E1E42DFC39D /* Pods_App.framework in Frameworks */,
40
+ 4D22ABE92AF431CB00220026 /* CapApp-SPM in Frameworks */,
44
41
  );
45
42
  runOnlyForDeploymentPostprocessing = 0;
46
43
  };
@@ -50,7 +47,6 @@
50
47
  27E2DDA53C4D2A4D1A88CE4A /* Frameworks */ = {
51
48
  isa = PBXGroup;
52
49
  children = (
53
- AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */,
54
50
  );
55
51
  name = Frameworks;
56
52
  sourceTree = "<group>";
@@ -60,7 +56,6 @@
60
56
  children = (
61
57
  504EC3061FED79650016851F /* App */,
62
58
  504EC3051FED79650016851F /* Products */,
63
- 7F8756D8B27F46E3366F6CEA /* Pods */,
64
59
  27E2DDA53C4D2A4D1A88CE4A /* Frameworks */,
65
60
  );
66
61
  sourceTree = "<group>";
@@ -79,7 +74,7 @@
79
74
  34ADEF8A2B6C25C900B38C44 /* App.entitlements */,
80
75
  50379B222058CBB4000EE86E /* capacitor.config.json */,
81
76
  504EC3071FED79650016851F /* AppDelegate.swift */,
82
- 504EC30B1FED79650016851F /* Main.storyboard */,
77
+ 9582B6822FE993A50072D4E8 /* SceneDelegate.swift */,
83
78
  504EC30E1FED79650016851F /* Assets.xcassets */,
84
79
  504EC3101FED79650016851F /* LaunchScreen.storyboard */,
85
80
  504EC3131FED79650016851F /* Info.plist */,
@@ -90,15 +85,6 @@
90
85
  path = App;
91
86
  sourceTree = "<group>";
92
87
  };
93
- 7F8756D8B27F46E3366F6CEA /* Pods */ = {
94
- isa = PBXGroup;
95
- children = (
96
- FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */,
97
- AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */,
98
- );
99
- name = Pods;
100
- sourceTree = "<group>";
101
- };
102
88
  /* End PBXGroup section */
103
89
 
104
90
  /* Begin PBXNativeTarget section */
@@ -106,18 +92,18 @@
106
92
  isa = PBXNativeTarget;
107
93
  buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
108
94
  buildPhases = (
109
- 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */,
110
95
  504EC3001FED79650016851F /* Sources */,
111
96
  504EC3011FED79650016851F /* Frameworks */,
112
97
  504EC3021FED79650016851F /* Resources */,
113
- 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */,
114
- 2D88F7C878728A28B89ACF35 /* [CP] Copy Pods Resources */,
115
98
  );
116
99
  buildRules = (
117
100
  );
118
101
  dependencies = (
119
102
  );
120
103
  name = App;
104
+ packageProductDependencies = (
105
+ 4D22ABE82AF431CB00220026 /* CapApp-SPM */,
106
+ );
121
107
  productName = App;
122
108
  productReference = 504EC3041FED79650016851F /* App.app */;
123
109
  productType = "com.apple.product-type.application";
@@ -139,7 +125,7 @@
139
125
  };
140
126
  };
141
127
  buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
142
- compatibilityVersion = "Xcode 8.0";
128
+ compatibilityVersion = "Xcode 15.0";
143
129
  developmentRegion = en;
144
130
  hasScannedForEncodings = 0;
145
131
  knownRegions = (
@@ -148,6 +134,9 @@
148
134
  );
149
135
  mainGroup = 504EC2FB1FED79650016851F;
150
136
  productRefGroup = 504EC3051FED79650016851F /* Products */;
137
+ packageReferences = (
138
+ D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */,
139
+ );
151
140
  projectDirPath = "";
152
141
  projectRoot = "";
153
142
  targets = (
@@ -165,7 +154,6 @@
165
154
  50B271D11FEDC1A000F3C39B /* public in Resources */,
166
155
  504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
167
156
  50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
168
- 504EC30D1FED79650016851F /* Main.storyboard in Resources */,
169
157
  2FAD9763203C412B000D30F8 /* config.xml in Resources */,
170
158
  C3C12F0D2DEDD3AA0068B75D /* db.dat in Resources */,
171
159
  );
@@ -173,56 +161,6 @@
173
161
  };
174
162
  /* End PBXResourcesBuildPhase section */
175
163
 
176
- /* Begin PBXShellScriptBuildPhase section */
177
- 2D88F7C878728A28B89ACF35 /* [CP] Copy Pods Resources */ = {
178
- isa = PBXShellScriptBuildPhase;
179
- buildActionMask = 2147483647;
180
- files = (
181
- );
182
- inputPaths = (
183
- );
184
- name = "[CP] Copy Pods Resources";
185
- outputPaths = (
186
- );
187
- runOnlyForDeploymentPostprocessing = 0;
188
- shellPath = /bin/sh;
189
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-resources.sh\"\n";
190
- showEnvVarsInLog = 0;
191
- };
192
- 6634F4EFEBD30273BCE97C65 /* [CP] Check Pods Manifest.lock */ = {
193
- isa = PBXShellScriptBuildPhase;
194
- buildActionMask = 2147483647;
195
- files = (
196
- );
197
- inputPaths = (
198
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
199
- "${PODS_ROOT}/Manifest.lock",
200
- );
201
- name = "[CP] Check Pods Manifest.lock";
202
- outputPaths = (
203
- "$(DERIVED_FILE_DIR)/Pods-App-checkManifestLockResult.txt",
204
- );
205
- runOnlyForDeploymentPostprocessing = 0;
206
- shellPath = /bin/sh;
207
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
208
- showEnvVarsInLog = 0;
209
- };
210
- 9592DBEFFC6D2A0C8D5DEB22 /* [CP] Embed Pods Frameworks */ = {
211
- isa = PBXShellScriptBuildPhase;
212
- buildActionMask = 2147483647;
213
- files = (
214
- );
215
- inputPaths = (
216
- );
217
- name = "[CP] Embed Pods Frameworks";
218
- outputPaths = (
219
- );
220
- runOnlyForDeploymentPostprocessing = 0;
221
- shellPath = /bin/sh;
222
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-App/Pods-App-frameworks.sh\"\n";
223
- showEnvVarsInLog = 0;
224
- };
225
- /* End PBXShellScriptBuildPhase section */
226
164
 
227
165
  /* Begin PBXSourcesBuildPhase section */
228
166
  504EC3001FED79650016851F /* Sources */ = {
@@ -230,20 +168,13 @@
230
168
  buildActionMask = 2147483647;
231
169
  files = (
232
170
  504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
171
+ 9582B6832FE993A70072D4E8 /* SceneDelegate.swift in Sources */,
233
172
  );
234
173
  runOnlyForDeploymentPostprocessing = 0;
235
174
  };
236
175
  /* End PBXSourcesBuildPhase section */
237
176
 
238
177
  /* Begin PBXVariantGroup section */
239
- 504EC30B1FED79650016851F /* Main.storyboard */ = {
240
- isa = PBXVariantGroup;
241
- children = (
242
- 504EC30C1FED79650016851F /* Base */,
243
- );
244
- name = Main.storyboard;
245
- sourceTree = "<group>";
246
- };
247
178
  504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
248
179
  isa = PBXVariantGroup;
249
180
  children = (
@@ -308,6 +239,7 @@
308
239
  ONLY_ACTIVE_ARCH = YES;
309
240
  SDKROOT = iphoneos;
310
241
  SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
242
+ CAPACITOR_DEBUG = true;
311
243
  SWIFT_OPTIMIZATION_LEVEL = "-Onone";
312
244
  };
313
245
  name = Debug;
@@ -364,7 +296,6 @@
364
296
  };
365
297
  504EC3171FED79650016851F /* Debug */ = {
366
298
  isa = XCBuildConfiguration;
367
- baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
368
299
  buildSettings = {
369
300
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
370
301
  CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
@@ -374,10 +305,10 @@
374
305
  IPHONEOS_DEPLOYMENT_TARGET = 15.0;
375
306
  LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
376
307
  MARKETING_VERSION = 1.0;
377
- OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
378
308
  PRODUCT_BUNDLE_IDENTIFIER = com.regula.example.dr.capacitor;
379
309
  PRODUCT_NAME = "$(TARGET_NAME)";
380
310
  SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
311
+ CAPACITOR_DEBUG = true;
381
312
  SWIFT_VERSION = 5.0;
382
313
  TARGETED_DEVICE_FAMILY = "1,2";
383
314
  };
@@ -385,7 +316,6 @@
385
316
  };
386
317
  504EC3181FED79650016851F /* Release */ = {
387
318
  isa = XCBuildConfiguration;
388
- baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
389
319
  buildSettings = {
390
320
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
391
321
  CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
@@ -425,6 +355,20 @@
425
355
  defaultConfigurationName = Release;
426
356
  };
427
357
  /* End XCConfigurationList section */
358
+ /* Begin XCLocalSwiftPackageReference section */
359
+ D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */ = {
360
+ isa = XCLocalSwiftPackageReference;
361
+ relativePath = "CapApp-SPM";
362
+ };
363
+ /* End XCLocalSwiftPackageReference section */
364
+
365
+ /* Begin XCSwiftPackageProductDependency section */
366
+ 4D22ABE82AF431CB00220026 /* CapApp-SPM */ = {
367
+ isa = XCSwiftPackageProductDependency;
368
+ package = D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */;
369
+ productName = "CapApp-SPM";
370
+ };
371
+ /* End XCSwiftPackageProductDependency section */
428
372
  };
429
373
  rootObject = 504EC2FC1FED79650016851F /* Project object */;
430
374
  }
@@ -0,0 +1 @@
1
+ public let isCapacitorApp = true
@@ -1,30 +1,25 @@
1
1
  {
2
2
  "name": "document-reader",
3
+ "type": "module",
3
4
  "scripts": {
4
5
  "setup": "scripts/setup.sh",
5
6
  "ios": "scripts/ios.sh",
6
7
  "android": "scripts/android.sh"
7
8
  },
8
9
  "dependencies": {
9
- "@regulaforensics/document-reader": "9.9.1147-nightly",
10
- "@regulaforensics/document-reader-core-fullauthrfid": "9.8.2974",
11
- "@regulaforensics/document-reader-btdevice": "9.8.68",
12
- "@awesome-cordova-plugins/file": "^8.1.0",
13
- "@awesome-cordova-plugins/camera": "^8.1.0",
14
- "cordova-plugin-file": "^8.1.3",
15
- "cordova-plugin-camera": "^8.0.0",
16
- "@capacitor/cli": "^8.0.2",
17
- "@capacitor/core": "^8.0.2",
18
- "@capacitor/app": "^8.0.0",
19
- "@capacitor/ios": "^8.0.2",
20
- "@capacitor/android": "^8.0.2",
21
- "@capacitor/status-bar": "^8.0.0",
22
- "@ionic/react": "^8.7.17",
23
- "@vitejs/plugin-react": "^5.1.2",
24
- "vite-plugin-static-copy": "^3.2.0",
25
- "@types/react-router-dom": "^5.3.3"
10
+ "@regulaforensics/document-reader": "9.9.1155-beta",
11
+ "@regulaforensics/document-reader-core-fullauthrfid": "9.8.2852-beta",
12
+ "@regulaforensics/document-reader-btdevice": "9.9.90-beta",
13
+ "@capacitor/cli": "^8.5.2",
14
+ "@capacitor/core": "^8.5.2",
15
+ "@capacitor/ios": "^8.5.2",
16
+ "@capacitor/android": "^8.5.2",
17
+ "@capacitor/camera": "^8.2.4",
18
+ "vite": "^8.3.0"
26
19
  },
27
20
  "overrides": {
28
- "esbuild": "^0.28.1"
21
+ "xcode": {
22
+ "uuid": "^11.1.1"
23
+ }
29
24
  }
30
25
  }
@@ -1,11 +1,8 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
5
- ionic cap sync android
6
- open -a 'Android Studio' android
7
- else
8
- ionic cap run android
9
- fi
10
-
11
- exit 0
4
+ vite build
5
+ npx cap sync android
6
+ [[ " $* " == *" --open "* || " $* " == *" -o "* ]] &&
7
+ npx cap open android ||
8
+ npx cap run android --no-sync
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
5
- ionic cap run ios --open
6
- else
7
- ionic cap run ios
8
- fi
9
-
10
- exit 0
4
+ vite build
5
+ npx cap sync ios
6
+ [[ " $* " == *" --open "* || " $* " == *" -o "* ]] &&
7
+ npx cap open ios ||
8
+ npx cap run ios --no-sync
@@ -2,13 +2,8 @@
2
2
  set -e
3
3
 
4
4
  npm install
5
- ionic cap sync ios || {
6
- cd ios/App
7
- pod update
8
- cd ../../
9
- }
5
+ vite build
6
+ npx cap sync
10
7
 
11
8
  cp public/assets/db.dat ios/App/App/
12
9
  cp public/assets/db.dat android/app/src/main/assets/Regula/
13
-
14
- exit 0
@@ -1,6 +1,7 @@
1
1
  html,
2
2
  body {
3
3
  margin: 0;
4
+ font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, sans-serif;
4
5
  width: 100%;
5
6
  height: 99vh;
6
7
  display: flex;
@@ -8,6 +9,10 @@ body {
8
9
  flex-direction: column;
9
10
  }
10
11
 
12
+ * {
13
+ box-sizing: border-box;
14
+ }
15
+
11
16
  /* Prevent text selection */
12
17
  * {
13
18
  user-select: none !important;
@@ -1,17 +1,5 @@
1
- import react from '@vitejs/plugin-react'
2
1
  import { defineConfig } from 'vite'
3
- import { viteStaticCopy } from 'vite-plugin-static-copy';
4
2
 
5
3
  export default defineConfig({
6
- plugins: [
7
- react(),
8
- viteStaticCopy({
9
- targets: [
10
- {
11
- src: 'src/main.html',
12
- dest: '.'
13
- }
14
- ]
15
- })],
16
4
  build: { outDir: 'www' }
17
5
  })
@@ -0,0 +1,22 @@
1
+ # Regula Document Reader Capacitor 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 `public/assets/` (you can get a trial license [here](https://client.regulaforensics.com)).
6
+ 3. Put `db.dat` file at `public/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,50 @@
1
+ apply plugin: 'com.android.application'
2
+
3
+ android {
4
+ namespace = "com.regula.example.dr.capacitor"
5
+ compileSdkVersion rootProject.ext.compileSdkVersion
6
+ defaultConfig {
7
+ applicationId "com.regula.example.dr.capacitor"
8
+ minSdkVersion rootProject.ext.minSdkVersion
9
+ targetSdkVersion rootProject.ext.targetSdkVersion
10
+ versionCode 1
11
+ versionName "1.0"
12
+ aaptOptions {
13
+ // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
14
+ // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
15
+ ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
16
+ }
17
+ }
18
+ buildTypes {
19
+ release {
20
+ minifyEnabled false
21
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22
+ }
23
+ }
24
+ }
25
+
26
+ repositories {
27
+ flatDir{
28
+ dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
29
+ }
30
+ }
31
+
32
+ dependencies {
33
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
34
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
35
+ implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
36
+ implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
37
+ implementation project(':capacitor-android')
38
+ implementation project(':capacitor-cordova-android-plugins')
39
+ }
40
+
41
+ apply from: 'capacitor.build.gradle'
42
+
43
+ try {
44
+ def servicesJSON = file('google-services.json')
45
+ if (servicesJSON.text) {
46
+ apply plugin: 'com.google.gms.google-services'
47
+ }
48
+ } catch(Exception e) {
49
+ logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
50
+ }
@@ -0,0 +1,21 @@
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
@@ -0,0 +1,27 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+
3
+ <application
4
+ android:allowBackup="true"
5
+ android:icon="@drawable/launcher"
6
+ android:label="Document"
7
+ android:supportsRtl="true"
8
+ android:theme="@style/AppTheme"
9
+ android:usesCleartextTraffic="true">
10
+ <activity
11
+ android:name=".MainActivity"
12
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
13
+ android:exported="true"
14
+ android:launchMode="singleTask"
15
+ android:screenOrientation="portrait"
16
+ android:theme="@style/AppTheme.NoActionBarLaunch">
17
+ <intent-filter>
18
+ <action android:name="android.intent.action.MAIN" />
19
+ <category android:name="android.intent.category.LAUNCHER" />
20
+ </intent-filter>
21
+ </activity>
22
+ </application>
23
+
24
+ <uses-permission android:name="android.permission.NFC" />
25
+ <uses-permission android:name="android.permission.INTERNET" />
26
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
27
+ </manifest>
@@ -0,0 +1,5 @@
1
+ package com.regula.example.dr.capacitor;
2
+
3
+ import com.getcapacitor.BridgeActivity;
4
+
5
+ public class MainActivity extends BridgeActivity {}
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
4
+ </adaptive-icon>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <foreground android:drawable="@drawable/ic_launcher_foreground"/>
4
+ </adaptive-icon>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:app="http://schemas.android.com/apk/res-auto"
4
+ xmlns:tools="http://schemas.android.com/tools"
5
+ android:layout_width="match_parent"
6
+ android:layout_height="match_parent"
7
+ tools:context=".MainActivity">
8
+
9
+ <WebView
10
+ android:layout_width="match_parent"
11
+ android:layout_height="match_parent" />
12
+ </androidx.coordinatorlayout.widget.CoordinatorLayout>