@dariyd/react-native-document-scanner 2.0.17 → 2.0.18
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/README.md +3 -6
- package/ios/DocumentScanner.mm +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@dariyd/react-native-document-scanner) [](./LICENSE)
|
|
4
4
|
|
|
5
|
-
Fast, native React Native document scanner for iOS and Android using Apple VisionKit (iOS) and Google ML Kit (Android). Features automatic document detection, edge/perspective correction, multi‑page scanning, configurable image quality, optional Base64, and support for the React Native New Architecture
|
|
5
|
+
Fast, native React Native document scanner for iOS and Android using Apple VisionKit (iOS) and Google ML Kit (Android). Features automatic document detection, edge/perspective correction, multi‑page scanning, configurable image quality, optional Base64, and support for the React Native New Architecture on ios and android.
|
|
6
6
|
|
|
7
7
|
- **iOS**: Uses VisionKit framework and VNDocumentCameraViewController
|
|
8
8
|
- **Android**: Uses ML Kit Document Scanner API
|
|
@@ -17,7 +17,7 @@ Fast, native React Native document scanner for iOS and Android using Apple Visio
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
- 📱 Cross-platform support (iOS 13+ and Android API 21+)
|
|
20
|
-
- 🚀 iOS: Full support for new React Native architecture (Fabric/TurboModules)
|
|
20
|
+
- 🚀 iOS & Android: Full support for new React Native architecture (Fabric/TurboModules)
|
|
21
21
|
- 📸 Automatic document detection and scanning
|
|
22
22
|
- 🖼️ Multi-page document scanning
|
|
23
23
|
- ⚙️ Configurable image quality
|
|
@@ -105,10 +105,7 @@ This module requires **React Native 0.77.3 or higher** and supports the new arch
|
|
|
105
105
|
|
|
106
106
|
**✅ iOS**: Fully supported - Set `RCT_NEW_ARCH_ENABLED=1` in your Podfile or build settings
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
- The module is implemented as a Java-only TurboModule on Android, which requires additional C++ bridging setup
|
|
110
|
-
- Keep `newArchEnabled=false` in your `gradle.properties` for now
|
|
111
|
-
- The module works perfectly with the old architecture on Android
|
|
108
|
+
**✅ Android**: Fully supported - Keep `newArchEnabled=true` in your `gradle.properties`
|
|
112
109
|
|
|
113
110
|
The iOS implementation will automatically use Fabric/TurboModules when enabled, while Android will continue to use the stable bridge implementation.
|
|
114
111
|
|
package/ios/DocumentScanner.mm
CHANGED
|
@@ -170,7 +170,7 @@ RCT_EXPORT_METHOD(launchScanner:(NSDictionary *)options callback:(RCTResponseSen
|
|
|
170
170
|
|
|
171
171
|
- (void)documentCameraViewController:(VNDocumentCameraViewController *)controller didFailWithError:(NSError *)error {
|
|
172
172
|
[controller dismissViewControllerAnimated:true completion:^{
|
|
173
|
-
self.callback(@[@{ @"error": @YES, @"errorMessage": error.localizedFailureReason }]);
|
|
173
|
+
self.callback(@[@{ @"error": @YES, @"errorMessage": error.localizedFailureReason ?: error.localizedDescription }]);
|
|
174
174
|
}];
|
|
175
175
|
}
|
|
176
176
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dariyd/react-native-document-scanner",
|
|
3
3
|
"title": "React Native Document Scanner",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.18",
|
|
5
5
|
"description": "React Native document scanner using VisionKit (iOS) and ML Kit (Android) with support for both old and new architecture",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|