react-native-scanbot-barcode-scanner-sdk 4.2.0 → 4.3.0-beta.1
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/Libraries.txt +31 -31
- package/RNScanbotBarcodeSDK.podspec +1 -4
- package/android/build.gradle +6 -5
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPackage.kt +9 -7
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerView.kt +114 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewEvents.kt +56 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewManager.kt +256 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/JSONObject.kt +18 -2
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/extensions/ReadableMap.kt +3 -4
- package/android/src/newarch/ScanbotBarcodeScannerViewManagerSpec.kt +19 -0
- package/android/src/oldarch/ScanbotBarcodeScannerViewManagerSpec.kt +29 -0
- package/dist/components/barcode-camera-view/ScanbotBarcodeCameraView.d.ts +3 -0
- package/dist/components/barcode-camera-view/ScanbotBarcodeCameraView.js +122 -0
- package/dist/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts +89 -0
- package/dist/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.js +2 -0
- package/dist/components/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts +54 -0
- package/dist/components/spec/ScanbotBarcodeScannerViewNativeComponent.js +12 -0
- package/dist/configurations.d.ts +241 -0
- package/dist/configurations.js +2 -0
- package/dist/customConfigurations.d.ts +94 -0
- package/dist/customConfigurations.js +2 -0
- package/dist/customResults.d.ts +5 -0
- package/dist/customResults.js +2 -0
- package/dist/customTypes.d.ts +7 -0
- package/dist/customTypes.js +2 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +34 -0
- package/dist/results.d.ts +29 -0
- package/dist/results.js +2 -0
- package/dist/types.d.ts +1194 -0
- package/dist/types.js +2 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.h +25 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.m +194 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.h +20 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.mm +259 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.h +99 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.m +196 -0
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewManager.mm +73 -0
- package/package.json +16 -21
- package/src/components/barcode-camera-view/ScanbotBarcodeCameraView.tsx +112 -0
- package/src/components/barcode-camera-view/ScanbotBarcodeCameraViewProperties.ts +106 -0
- package/src/components/spec/ScanbotBarcodeScannerViewNativeComponent.ts +59 -0
- package/src/index.ts +58 -0
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraView.java +0 -401
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/base/communication/ScanbotEventEmitter.java +0 -78
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/base/communication/ScanbotEventReceiver.java +0 -119
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/base/ui/ScanbotViewWrapper.java +0 -26
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/JSONUtils.kt +0 -24
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/utils/ScanbotViewUtils.java +0 -43
- package/android/src/new-architecture/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraViewManager.java +0 -125
- package/android/src/old-architecture/io/scanbot/barcodesdk/plugin/reactnative/components/barcodecameraview/ScanbotBarcodeCameraViewManager.java +0 -114
- package/index.d.ts +0 -42
- package/index.js +0 -20
- package/ios/Components/BarcodeCameraView/NewArchitecture/RTNScanbotBarcodeCameraView.h +0 -44
- package/ios/Components/BarcodeCameraView/NewArchitecture/RTNScanbotBarcodeCameraView.mm +0 -338
- package/ios/Components/BarcodeCameraView/NewArchitecture/RTNScanbotBarcodeCameraViewManager.mm +0 -71
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraView.h +0 -36
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraView.mm +0 -181
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraViewManager.h +0 -28
- package/ios/Components/BarcodeCameraView/OldArchitecture/RNScanbotBarcodeCameraViewManager.mm +0 -89
- package/js/RTNScanbotBarcodeCameraViewNativeComponent.ts +0 -186
- package/src/components/barcode-camera-view/scanbot-barcode-camera-view-types.ts +0 -175
- package/src/components/barcode-camera-view/scanbot-barcode-camera-view.tsx +0 -270
- package/src/components/barcode-camera-view/scanbot-native-barcode-camera-view.ts +0 -7
package/dist/types.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNScanbotBarcodeScannerPaperView.h
|
|
3
|
+
// RNScanbotBarcodeSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Stefan Krzhovski on 27.05.24.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
9
|
+
|
|
10
|
+
#ifndef RNScanbotBarcodeScannerLegacyView_h
|
|
11
|
+
#define RNScanbotBarcodeScannerLegacyView_h
|
|
12
|
+
|
|
13
|
+
#import <ScanbotBarcodeScannerSDK/ScanbotBarcodeScannerSDK.h>
|
|
14
|
+
#import "RNScanbotBarcodeScannerViewControllerWrapper.h"
|
|
15
|
+
#import "RCTComponent.h"
|
|
16
|
+
|
|
17
|
+
@interface RNScanbotBarcodeScannerLegacyView: UIView<SBSDKBarcodeScannerViewControllerDelegate>
|
|
18
|
+
@property (nonatomic, copy) RCTDirectEventBlock onBarcodeScannerResult;
|
|
19
|
+
|
|
20
|
+
- (void) freezeCamera;
|
|
21
|
+
- (void) unfreezeCamera;
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
#endif /* RNScanbotBarcodeScannerPaperView_h */
|
|
25
|
+
#endif /* Old Arch */
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNScanbotBarcodeScannerPaperView.m
|
|
3
|
+
// RNScanbotBarcodeSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Stefan Krzhovski on 27.05.24.
|
|
6
|
+
//
|
|
7
|
+
#if !defined(RCT_NEW_ARCH_ENABLED)
|
|
8
|
+
#import "RNScanbotBarcodeScannerLegacyView.h"
|
|
9
|
+
#import "RCTComponent.h"
|
|
10
|
+
|
|
11
|
+
@interface RNScanbotBarcodeScannerLegacyView()
|
|
12
|
+
@property (strong, nonatomic) SBSDKBarcodeScannerViewController *scannerViewController;
|
|
13
|
+
@property (nonatomic) BOOL scanningEnabled;
|
|
14
|
+
@end
|
|
15
|
+
|
|
16
|
+
@implementation RNScanbotBarcodeScannerLegacyView
|
|
17
|
+
|
|
18
|
+
- (instancetype)initWithFrame:(CGRect)frame
|
|
19
|
+
{
|
|
20
|
+
if (self = [super initWithFrame:frame]) {
|
|
21
|
+
_scanningEnabled = true;
|
|
22
|
+
_scannerViewController = [RNScanbotBarcodeScannerViewControllerWrapper initController];
|
|
23
|
+
_scannerViewController.delegate = self;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return self;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
- (void)didMoveToWindow {
|
|
30
|
+
UIViewController *vc = [[UIViewController alloc] init];
|
|
31
|
+
vc.view = self;
|
|
32
|
+
[_scannerViewController attach:vc parentView:self];
|
|
33
|
+
[super didMoveToWindow];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
- (void)removeFromSuperview {
|
|
37
|
+
self.scannerViewController = nil;
|
|
38
|
+
[super removeFromSuperview];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
- (void) setScanningEnabled:(BOOL)value {
|
|
42
|
+
_scanningEnabled = value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
- (void) setFlashEnabled:(BOOL)value {
|
|
46
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFlashEnabled:self.scannerViewController value:value];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
- (void) setFinderEnabled:(BOOL)value {
|
|
50
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
51
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderEnabled:finderConfig value:value];
|
|
52
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
- (void) setFinderStrokeWidth:(int)value {
|
|
56
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
57
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderStrokeWidth:finderConfig value:value];
|
|
58
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
- (void) setFinderStrokeColor:(UIColor *)value {
|
|
62
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
63
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderStrokeColor:finderConfig value:value];
|
|
64
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
- (void) setFinderOverlayColor:(UIColor *)value {
|
|
68
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
69
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderOverlayColor:finderConfig value:value];
|
|
70
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
- (void) setFinderInset:(NSDictionary *)value {
|
|
74
|
+
NSNumber *top = [value valueForKey:@"top"];
|
|
75
|
+
NSNumber *left = [value valueForKey:@"left"];
|
|
76
|
+
NSNumber *bottom = [value valueForKey:@"bottom"];
|
|
77
|
+
NSNumber *right = [value valueForKey:@"right"];
|
|
78
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
79
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderInset:finderConfig
|
|
80
|
+
top:[top floatValue]
|
|
81
|
+
left:[left floatValue]
|
|
82
|
+
bottom:[bottom floatValue]
|
|
83
|
+
right:[right floatValue]];
|
|
84
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
- (void) setFinderRequiredAspectRatios:(NSDictionary *)value {
|
|
88
|
+
NSNumber *width = [value valueForKey:@"width"];
|
|
89
|
+
NSNumber *height = [value valueForKey:@"height"];
|
|
90
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
91
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderRequiredAspectRatios:finderConfig width:[width doubleValue] height:[height doubleValue]];
|
|
92
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
- (void) setCameraZoomFactor:(float)value {
|
|
96
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraZoomFactor:self.scannerViewController value:value];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
- (void) setCameraZoomRange:(NSDictionary *)value {
|
|
100
|
+
NSNumber *minZoom = [value valueForKey:@"minZoom"];
|
|
101
|
+
NSNumber *maxZoom = [value valueForKey:@"maxZoom"];
|
|
102
|
+
SBSDKBaseScannerZoomConfiguration *zoomConfig = self.scannerViewController.zoomConfiguration;
|
|
103
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraZoomRange:zoomConfig minZoom:[minZoom floatValue] maxZoom:[maxZoom floatValue]];
|
|
104
|
+
self.scannerViewController.zoomConfiguration = zoomConfig;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
- (void) setMinFocusDistanceLock:(BOOL)value {
|
|
108
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinFocusDistanceLock:self.scannerViewController value:value];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
- (void) setCameraModule:(NSString *)value {
|
|
112
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraDevice:self.scannerViewController value:value];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
- (void) setDetectorConfig:(NSDictionary *)configDict {
|
|
116
|
+
SBBWrapperBarcodeCameraViewConfiguration* decodedConfig = [SBBWrapperBarcodeCameraViewConfiguration fromDicitonary: configDict];
|
|
117
|
+
SBSDKBarcodeAdditionalParameters *additionalConfig = self.scannerViewController.additionalDetectionParameters;
|
|
118
|
+
|
|
119
|
+
NSNumber *minimumTextLenght = [configDict valueForKey:@"minimumTextLength"];
|
|
120
|
+
NSNumber *maximumTextLenght = [configDict valueForKey:@"maximumTextLength"];
|
|
121
|
+
NSNumber *minimum1DBarcodesQuietZone = [configDict valueForKey:@"minimum1DBarcodesQuietZone"];
|
|
122
|
+
|
|
123
|
+
if([configDict valueForKey:@"barcodeFormats"] != nil){
|
|
124
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setBarcodeFormats:self.scannerViewController acceptedBarcodeTypes:decodedConfig.acceptedBarcodeTypes];
|
|
125
|
+
}
|
|
126
|
+
if([configDict valueForKey:@"acceptedDocumentFormats"] != nil){
|
|
127
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setDocumentFormats:self.scannerViewController acceptedDocumentTypes:decodedConfig.acceptedDocumentTypes];
|
|
128
|
+
}
|
|
129
|
+
if([configDict valueForKey:@"engineMode"] != nil){
|
|
130
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setEngineMode:self.scannerViewController engineMode:decodedConfig.engineMode];
|
|
131
|
+
}
|
|
132
|
+
if([configDict valueForKey:@"barcodesExtensionFilter"] != nil){
|
|
133
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setBarcodeExtensionFilter:self.scannerViewController
|
|
134
|
+
filter:decodedConfig.barcodesExtensionFilter];
|
|
135
|
+
}
|
|
136
|
+
if([configDict valueForKey:@"lowPowerMode"] != nil){
|
|
137
|
+
BOOL lowPowerMode = [[configDict valueForKey:@"lowPowerMode"] boolValue];
|
|
138
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setLowPowerMode:self.scannerViewController value:lowPowerMode];
|
|
139
|
+
}
|
|
140
|
+
if(minimumTextLenght != nil){
|
|
141
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinimumTextLenght:additionalConfig value:[minimumTextLenght intValue]];
|
|
142
|
+
}
|
|
143
|
+
if(maximumTextLenght != nil){
|
|
144
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMaximumTextLenght:additionalConfig value:[maximumTextLenght intValue]];
|
|
145
|
+
}
|
|
146
|
+
if(minimum1DBarcodesQuietZone != nil){
|
|
147
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinimum1DBarcodesQuietZone:additionalConfig value:[minimum1DBarcodesQuietZone intValue]];
|
|
148
|
+
}
|
|
149
|
+
if([configDict valueForKey:@"stripCheckDigits"] != nil){
|
|
150
|
+
BOOL stripCheckDigits = [[configDict valueForKey:@"stripCheckDigits"] boolValue];
|
|
151
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setStripCheckDigits:additionalConfig value:stripCheckDigits];
|
|
152
|
+
}
|
|
153
|
+
if([configDict valueForKey:@"gs1HandlingMode"] != nil){
|
|
154
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setGS1HandlingMode:additionalConfig gs1HandlingMode:decodedConfig.gs1Handling];
|
|
155
|
+
}
|
|
156
|
+
if([configDict valueForKey:@"msiPlesseyChecksumAlgorithm"] != nil){
|
|
157
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMsiPlesseyChecksumAlgorithm:additionalConfig msiPlesseyChecksumAlgorithm:decodedConfig.msiPlesseyChecksumAlgorithm];
|
|
158
|
+
}
|
|
159
|
+
if([configDict valueForKey:@"codeDensity"] != nil){
|
|
160
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCodeDensity:additionalConfig codeDencity:decodedConfig.codeDensity];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
self.scannerViewController.additionalDetectionParameters = additionalConfig;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
- (void) freezeCamera {
|
|
167
|
+
[RNScanbotBarcodeScannerViewControllerWrapper freezeCamera:self.scannerViewController];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
- (void) unfreezeCamera {
|
|
171
|
+
[RNScanbotBarcodeScannerViewControllerWrapper unfreezeCamera:self.scannerViewController];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
- (void)barcodeScannerController:(nonnull SBSDKBarcodeScannerViewController *)controller
|
|
175
|
+
didDetectBarcodes:(nonnull NSArray<SBSDKBarcodeScannerResult *> *)codes {
|
|
176
|
+
|
|
177
|
+
if(!self.onBarcodeScannerResult) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
NSString *result = [RNScanbotBarcodeScannerViewControllerWrapper jsonFromResultOrNil:codes];
|
|
182
|
+
if(result != nil){
|
|
183
|
+
self.onBarcodeScannerResult(@{@"result":result});
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
- (BOOL)barcodeScannerControllerShouldDetectBarcodes:(SBSDKBarcodeScannerViewController *)controller{
|
|
188
|
+
return _scanningEnabled;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@end
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
#endif
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNScanbotBarcodeScannerView.h
|
|
3
|
+
//
|
|
4
|
+
// Created by Stefan Krzhovski on 21.05.24.
|
|
5
|
+
//
|
|
6
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
7
|
+
#import <React/RCTViewComponentView.h>
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
|
|
10
|
+
#import <ScanbotBarcodeScannerSDK/ScanbotBarcodeScannerSDK.h>
|
|
11
|
+
#import <ScanbotBarcodeSDKWrapper/ScanbotBarcodeSDKWrapper-Swift.h>
|
|
12
|
+
#import "RNScanbotBarcodeScannerViewControllerWrapper.h"
|
|
13
|
+
|
|
14
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
+
|
|
16
|
+
@interface RNScanbotBarcodeScannerView : RCTViewComponentView<SBSDKBarcodeScannerViewControllerDelegate>
|
|
17
|
+
@end
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_END
|
|
20
|
+
#endif
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNScanbotBarcodeScannerView.m
|
|
3
|
+
// RNScanbotBarcodeSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Stefan Krzhovski on 21.05.24.
|
|
6
|
+
//
|
|
7
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
8
|
+
#import "RNScanbotBarcodeScannerView.h"
|
|
9
|
+
|
|
10
|
+
#import <react/renderer/components/RNScanbotBarcodeScannerViewSpec/ComponentDescriptors.h>
|
|
11
|
+
#import <react/renderer/components/RNScanbotBarcodeScannerViewSpec/EventEmitters.h>
|
|
12
|
+
#import <react/renderer/components/RNScanbotBarcodeScannerViewSpec/Props.h>
|
|
13
|
+
#import <react/renderer/components/RNScanbotBarcodeScannerViewSpec/RCTComponentViewHelpers.h>
|
|
14
|
+
|
|
15
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
16
|
+
#import <React/RCTConversions.h>
|
|
17
|
+
|
|
18
|
+
using namespace facebook::react;
|
|
19
|
+
|
|
20
|
+
@interface RNScanbotBarcodeScannerView() <RCTScanbotBarcodeScannerViewViewProtocol>
|
|
21
|
+
@property (strong, nonatomic) SBSDKBarcodeScannerViewController *scannerViewController;
|
|
22
|
+
@property (nonatomic) BOOL scanningEnabled;
|
|
23
|
+
@end
|
|
24
|
+
|
|
25
|
+
@implementation RNScanbotBarcodeScannerView
|
|
26
|
+
|
|
27
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
28
|
+
{
|
|
29
|
+
return concreteComponentDescriptorProvider<ScanbotBarcodeScannerViewComponentDescriptor>();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
- (instancetype)initWithFrame:(CGRect)frame
|
|
33
|
+
{
|
|
34
|
+
if (self = [super initWithFrame:frame]) {
|
|
35
|
+
static const auto defaultProps = std::make_shared<const ScanbotBarcodeScannerViewProps>();
|
|
36
|
+
_props = defaultProps;
|
|
37
|
+
_scanningEnabled = true;
|
|
38
|
+
_scannerViewController = [RNScanbotBarcodeScannerViewControllerWrapper initController];
|
|
39
|
+
_scannerViewController.delegate = self;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return self;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
- (void)didMoveToWindow {
|
|
46
|
+
UIViewController *vc = [[UIViewController alloc] init];
|
|
47
|
+
vc.view = self;
|
|
48
|
+
[_scannerViewController attach:vc parentView:self];
|
|
49
|
+
[super didMoveToWindow];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
- (void)removeFromSuperview {
|
|
53
|
+
self.scannerViewController = nil;
|
|
54
|
+
[super removeFromSuperview];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
58
|
+
{
|
|
59
|
+
const auto &oldViewProps = *std::static_pointer_cast<ScanbotBarcodeScannerViewProps const>(_props);
|
|
60
|
+
const auto &newViewProps = *std::static_pointer_cast<ScanbotBarcodeScannerViewProps const>(props);
|
|
61
|
+
|
|
62
|
+
SBSDKBaseScannerViewFinderConfiguration *finderConfig = self.scannerViewController.viewFinderConfiguration;
|
|
63
|
+
SBSDKBaseScannerZoomConfiguration *zoomConfig = self.scannerViewController.zoomConfiguration;
|
|
64
|
+
SBSDKBarcodeAdditionalParameters *additionalConfig = self.scannerViewController.additionalDetectionParameters;
|
|
65
|
+
SBBWrapperBarcodeCameraViewConfiguration* decodedConfig = [SBBWrapperBarcodeCameraViewConfiguration fromDicitonary: @{
|
|
66
|
+
@"barcodeFormats": [self vectorStringToNSArray:newViewProps.detectorConfig.barcodeFormats],
|
|
67
|
+
@"acceptedDocumentFormats": [self vectorStringToNSArray:newViewProps.detectorConfig.acceptedDocumentFormats],
|
|
68
|
+
@"engineMode": toNSString(newViewProps.detectorConfig.engineMode),
|
|
69
|
+
@"barcodesExtensionFilter": toNSString(newViewProps.detectorConfig.barcodesExtensionFilter),
|
|
70
|
+
@"gs1HandlingMode": toNSString(newViewProps.detectorConfig.gs1HandlingMode),
|
|
71
|
+
@"msiPlesseyChecksumAlgorithm": toNSString(newViewProps.detectorConfig.msiPlesseyChecksumAlgorithm),
|
|
72
|
+
}];
|
|
73
|
+
|
|
74
|
+
if(oldViewProps.flashEnabled != newViewProps.flashEnabled){
|
|
75
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFlashEnabled:self.scannerViewController value:newViewProps.flashEnabled];
|
|
76
|
+
}
|
|
77
|
+
if(oldViewProps.scanningEnabled != newViewProps.scanningEnabled){
|
|
78
|
+
self.scanningEnabled = newViewProps.scanningEnabled;
|
|
79
|
+
}
|
|
80
|
+
// MARK: FinderConfig Props
|
|
81
|
+
if(oldViewProps.finderEnabled != newViewProps.finderEnabled){
|
|
82
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderEnabled:finderConfig value:newViewProps.finderEnabled];
|
|
83
|
+
}
|
|
84
|
+
if(oldViewProps.finderStrokeWidth != newViewProps.finderStrokeWidth){
|
|
85
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderStrokeWidth:finderConfig value:newViewProps.finderStrokeWidth];
|
|
86
|
+
}
|
|
87
|
+
if(oldViewProps.finderStrokeColor != newViewProps.finderStrokeColor){
|
|
88
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderStrokeColor:finderConfig value:RCTUIColorFromSharedColor(newViewProps.finderStrokeColor)];
|
|
89
|
+
}
|
|
90
|
+
if(oldViewProps.finderOverlayColor != newViewProps.finderOverlayColor){
|
|
91
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderOverlayColor:finderConfig value:RCTUIColorFromSharedColor(newViewProps.finderOverlayColor)];
|
|
92
|
+
}
|
|
93
|
+
if(oldViewProps.finderInset != newViewProps.finderInset){
|
|
94
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderInset:finderConfig
|
|
95
|
+
top:newViewProps.finderInset.top
|
|
96
|
+
left:newViewProps.finderInset.left
|
|
97
|
+
bottom:newViewProps.finderInset.bottom
|
|
98
|
+
right:newViewProps.finderInset.right];
|
|
99
|
+
}
|
|
100
|
+
if(oldViewProps.finderRequiredAspectRatios != newViewProps.finderRequiredAspectRatios){
|
|
101
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setFinderRequiredAspectRatios:finderConfig
|
|
102
|
+
width:newViewProps.finderRequiredAspectRatios.width
|
|
103
|
+
height:newViewProps.finderRequiredAspectRatios.height];
|
|
104
|
+
}
|
|
105
|
+
// MARK: -
|
|
106
|
+
// MARK: CameraConfig Props
|
|
107
|
+
if(oldViewProps.cameraZoomFactor != newViewProps.cameraZoomFactor){
|
|
108
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraZoomFactor:self.scannerViewController value:newViewProps.cameraZoomFactor];
|
|
109
|
+
}
|
|
110
|
+
if(oldViewProps.cameraZoomRange != newViewProps.cameraZoomRange){
|
|
111
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraZoomRange:zoomConfig
|
|
112
|
+
minZoom:newViewProps.cameraZoomRange.minZoom
|
|
113
|
+
maxZoom:newViewProps.cameraZoomRange.maxZoom];
|
|
114
|
+
}
|
|
115
|
+
if(![self compareStringProps:oldViewProps.cameraModule withString:newViewProps.cameraModule]){
|
|
116
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCameraDevice:self.scannerViewController value:toNSString(newViewProps.cameraModule)];
|
|
117
|
+
}
|
|
118
|
+
if(oldViewProps.minFocusDistanceLock != newViewProps.minFocusDistanceLock){
|
|
119
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinFocusDistanceLock:self.scannerViewController value:newViewProps.minFocusDistanceLock];
|
|
120
|
+
}
|
|
121
|
+
// MARK: -
|
|
122
|
+
// MARK: Detector Config
|
|
123
|
+
if(oldViewProps.detectorConfig.barcodeFormats != newViewProps.detectorConfig.barcodeFormats){
|
|
124
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setBarcodeFormats:self.scannerViewController
|
|
125
|
+
acceptedBarcodeTypes:decodedConfig.acceptedBarcodeTypes];
|
|
126
|
+
}
|
|
127
|
+
if(oldViewProps.detectorConfig.acceptedDocumentFormats != newViewProps.detectorConfig.acceptedDocumentFormats){
|
|
128
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setDocumentFormats:self.scannerViewController
|
|
129
|
+
acceptedDocumentTypes:decodedConfig.acceptedDocumentTypes];
|
|
130
|
+
}
|
|
131
|
+
if(![self compareStringProps:oldViewProps.detectorConfig.engineMode withString:newViewProps.detectorConfig.engineMode]){
|
|
132
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setEngineMode:self.scannerViewController
|
|
133
|
+
engineMode:decodedConfig.engineMode];
|
|
134
|
+
}
|
|
135
|
+
if(![self compareStringProps:oldViewProps.detectorConfig.barcodesExtensionFilter
|
|
136
|
+
withString:newViewProps.detectorConfig.barcodesExtensionFilter]){
|
|
137
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setBarcodeExtensionFilter:self.scannerViewController
|
|
138
|
+
filter:decodedConfig.barcodesExtensionFilter];
|
|
139
|
+
}
|
|
140
|
+
if(oldViewProps.detectorConfig.lowPowerMode != newViewProps.detectorConfig.lowPowerMode){
|
|
141
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setLowPowerMode:self.scannerViewController value: newViewProps.detectorConfig.lowPowerMode];
|
|
142
|
+
}
|
|
143
|
+
if(oldViewProps.detectorConfig.minimumTextLength != newViewProps.detectorConfig.minimumTextLength){
|
|
144
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinimumTextLenght:additionalConfig value:newViewProps.detectorConfig.minimumTextLength];
|
|
145
|
+
}
|
|
146
|
+
if(oldViewProps.detectorConfig.maximumTextLength != newViewProps.detectorConfig.maximumTextLength){
|
|
147
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMaximumTextLenght:additionalConfig value:newViewProps.detectorConfig.maximumTextLength];
|
|
148
|
+
}
|
|
149
|
+
if(oldViewProps.detectorConfig.minimum1DBarcodesQuietZone != newViewProps.detectorConfig.minimum1DBarcodesQuietZone){
|
|
150
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMinimum1DBarcodesQuietZone:additionalConfig value:newViewProps.detectorConfig.minimum1DBarcodesQuietZone];
|
|
151
|
+
}
|
|
152
|
+
if(oldViewProps.detectorConfig.stripCheckDigits != newViewProps.detectorConfig.stripCheckDigits){
|
|
153
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setStripCheckDigits:additionalConfig value:newViewProps.detectorConfig.stripCheckDigits];
|
|
154
|
+
}
|
|
155
|
+
if(![self compareStringProps:oldViewProps.detectorConfig.gs1HandlingMode withString:newViewProps.detectorConfig.gs1HandlingMode]){
|
|
156
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setGS1HandlingMode:additionalConfig
|
|
157
|
+
gs1HandlingMode:decodedConfig.gs1Handling];
|
|
158
|
+
}
|
|
159
|
+
if(![self compareStringProps:oldViewProps.detectorConfig.msiPlesseyChecksumAlgorithm withString:newViewProps.detectorConfig.msiPlesseyChecksumAlgorithm]){
|
|
160
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setMsiPlesseyChecksumAlgorithm:additionalConfig
|
|
161
|
+
msiPlesseyChecksumAlgorithm:decodedConfig.msiPlesseyChecksumAlgorithm];
|
|
162
|
+
}
|
|
163
|
+
if(![self compareStringProps:oldViewProps.detectorConfig.msiPlesseyChecksumAlgorithm withString:newViewProps.detectorConfig.codeDensity]){
|
|
164
|
+
[RNScanbotBarcodeScannerViewControllerWrapper setCodeDensity:additionalConfig codeDencity:decodedConfig.codeDensity];
|
|
165
|
+
}
|
|
166
|
+
// MARK: -
|
|
167
|
+
self.scannerViewController.viewFinderConfiguration = finderConfig;
|
|
168
|
+
self.scannerViewController.zoomConfiguration = zoomConfig;
|
|
169
|
+
self.scannerViewController.additionalDetectionParameters = additionalConfig;
|
|
170
|
+
|
|
171
|
+
[super updateProps:props oldProps:oldProps];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
- (void)freezeCamera
|
|
175
|
+
{
|
|
176
|
+
[self.scannerViewController freezeCamera];
|
|
177
|
+
}
|
|
178
|
+
- (void)unfreezeCamera
|
|
179
|
+
{
|
|
180
|
+
[self.scannerViewController unfreezeCamera];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
- (void)handleCommand:(nonnull const NSString *)commandName
|
|
184
|
+
args:(nonnull const NSArray *)args
|
|
185
|
+
{
|
|
186
|
+
RCTScanbotBarcodeScannerViewHandleCommand(self, commandName, args);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
- (void)barcodeScannerController:(SBSDKBarcodeScannerViewController *)controller
|
|
190
|
+
didDetectBarcodes:(NSArray<SBSDKBarcodeScannerResult *> *)codes {
|
|
191
|
+
if (_eventEmitter == nullptr) return;
|
|
192
|
+
|
|
193
|
+
NSString *result = [RNScanbotBarcodeScannerViewControllerWrapper jsonFromResultOrNil:codes];
|
|
194
|
+
if(result != nil){
|
|
195
|
+
const auto &eventEmitter = std::dynamic_pointer_cast<const facebook::react::ScanbotBarcodeScannerViewEventEmitter>(_eventEmitter);
|
|
196
|
+
eventEmitter->onBarcodeScannerResult(facebook::react::ScanbotBarcodeScannerViewEventEmitter::OnBarcodeScannerResult{.result = std::string([result UTF8String])});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
- (BOOL)barcodeScannerControllerShouldDetectBarcodes:(SBSDKBarcodeScannerViewController *)controller {
|
|
201
|
+
return self.scanningEnabled;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
bool operator!=(ScanbotBarcodeScannerViewFinderInsetStruct const &i,ScanbotBarcodeScannerViewFinderInsetStruct const &j) {
|
|
205
|
+
return !(i.left == j.left && i.top == j.top && i.bottom && j.bottom && i.right == j.right);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
bool operator!=(ScanbotBarcodeScannerViewFinderRequiredAspectRatiosStruct const &i,ScanbotBarcodeScannerViewFinderRequiredAspectRatiosStruct const &j) {
|
|
209
|
+
return !(i.width == j.width && i.height == j.height);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
bool operator!=(ScanbotBarcodeScannerViewCameraZoomRangeStruct const &i, ScanbotBarcodeScannerViewCameraZoomRangeStruct const &j) {
|
|
213
|
+
return !(i.maxZoom == j.maxZoom && i.minZoom == j.minZoom);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
bool operator!=(std::vector<std::string> const &v1, std::vector<std::string> const &v2) {
|
|
217
|
+
|
|
218
|
+
bool differentItems = false;
|
|
219
|
+
if(v1.size() != v2.size()) return true;
|
|
220
|
+
|
|
221
|
+
for(int i = 0; i< v1.size(); i++){
|
|
222
|
+
if(!(v1[i] != v2[i])){
|
|
223
|
+
differentItems = true;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return differentItems;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
NSString* toNSString(std::string value) {
|
|
232
|
+
return [[NSString alloc] initWithCString:value.c_str() encoding:NSUTF8StringEncoding];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
- (NSArray*)vectorStringToNSArray:(std::vector<std::string>) vector {
|
|
236
|
+
NSMutableArray* nsArray = [NSMutableArray array];
|
|
237
|
+
|
|
238
|
+
for (auto const& value : vector) {
|
|
239
|
+
[nsArray addObject: toNSString(value)];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
return nsArray;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
- (BOOL)compareStringProps:(std::string)oldProp withString:(std::string)newProp {
|
|
246
|
+
return [toNSString(oldProp) isEqualToString:toNSString(newProp)];
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@end
|
|
250
|
+
|
|
251
|
+
Class<RCTComponentViewProtocol> ScanbotBarcodeScannerViewCls(void)
|
|
252
|
+
{
|
|
253
|
+
return RNScanbotBarcodeScannerView.class;
|
|
254
|
+
}
|
|
255
|
+
#endif
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RNScanbotBarcodeScannerViewHandler.h
|
|
3
|
+
// RNScanbotBarcodeSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Stefan Krzhovski on 27.05.24.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef RNScanbotBarcodeScannerViewControllerWrapper_h
|
|
9
|
+
#define RNScanbotBarcodeScannerViewControllerWrapper_h
|
|
10
|
+
#import <ScanbotBarcodeScannerSDK/ScanbotBarcodeScannerSDK.h>
|
|
11
|
+
#import <ScanbotBarcodeSDKWrapper/ScanbotBarcodeSDKWrapper-Swift.h>
|
|
12
|
+
|
|
13
|
+
@interface RNScanbotBarcodeScannerViewControllerWrapper : NSObject
|
|
14
|
+
|
|
15
|
+
+ (SBSDKBarcodeScannerViewController *) initController;
|
|
16
|
+
|
|
17
|
+
+ (void) setFlashEnabled:(SBSDKBarcodeScannerViewController*)controller
|
|
18
|
+
value:(BOOL)value;
|
|
19
|
+
|
|
20
|
+
+ (void) setFinderEnabled:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
21
|
+
value:(BOOL)value;
|
|
22
|
+
|
|
23
|
+
+ (void) setFinderStrokeWidth:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
24
|
+
value:(int)value;
|
|
25
|
+
|
|
26
|
+
+ (void) setFinderStrokeColor:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
27
|
+
value:(UIColor *)value;
|
|
28
|
+
|
|
29
|
+
+ (void) setFinderOverlayColor:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
30
|
+
value:(UIColor *)value;
|
|
31
|
+
|
|
32
|
+
+ (void) setFinderInset:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
33
|
+
top:(float)top
|
|
34
|
+
left:(float)left
|
|
35
|
+
bottom:(float)bottom
|
|
36
|
+
right:(float)right;
|
|
37
|
+
|
|
38
|
+
+ (void) setFinderRequiredAspectRatios:(SBSDKBaseScannerViewFinderConfiguration*)config
|
|
39
|
+
width:(double)width
|
|
40
|
+
height:(double)height;
|
|
41
|
+
|
|
42
|
+
+ (void) setCameraZoomFactor:(SBSDKBarcodeScannerViewController*)controller
|
|
43
|
+
value:(float)value;
|
|
44
|
+
|
|
45
|
+
+ (void) setCameraZoomRange:(SBSDKBaseScannerZoomConfiguration*)config
|
|
46
|
+
minZoom:(float)minZoom
|
|
47
|
+
maxZoom:(float)maxZoom;
|
|
48
|
+
|
|
49
|
+
+ (void) setCameraDevice:(SBSDKBarcodeScannerViewController*)controller
|
|
50
|
+
value:(NSString *)value;
|
|
51
|
+
|
|
52
|
+
+ (void) setMinFocusDistanceLock:(SBSDKBarcodeScannerViewController*)controller
|
|
53
|
+
value:(BOOL)value;
|
|
54
|
+
|
|
55
|
+
+ (void) setBarcodeFormats:(SBSDKBarcodeScannerViewController*)controller
|
|
56
|
+
acceptedBarcodeTypes:(NSArray<SBSDKBarcodeType *> *)acceptedBarcodeTypes;
|
|
57
|
+
|
|
58
|
+
+ (void) setDocumentFormats:(SBSDKBarcodeScannerViewController*)controller
|
|
59
|
+
acceptedDocumentTypes:(NSArray<SBSDKBarcodeDocumentType *> *)acceptedDocumentTypes;
|
|
60
|
+
|
|
61
|
+
+ (void) setEngineMode:(SBSDKBarcodeScannerViewController*)controller
|
|
62
|
+
engineMode:(SBSDKBarcodeEngineMode)engineMode;
|
|
63
|
+
|
|
64
|
+
+ (void) setBarcodeExtensionFilter:(SBSDKBarcodeScannerViewController*)controller
|
|
65
|
+
filter:(SBSDKBarcodesExtensionFilter)filter;
|
|
66
|
+
|
|
67
|
+
+ (void) setGS1HandlingMode:(SBSDKBarcodeAdditionalParameters*)config
|
|
68
|
+
gs1HandlingMode:(SBSDKGS1Handling)gs1HandlingMode;
|
|
69
|
+
|
|
70
|
+
+ (void) setMsiPlesseyChecksumAlgorithm:(SBSDKBarcodeAdditionalParameters*)config
|
|
71
|
+
msiPlesseyChecksumAlgorithm:(SBSDKBarcodeMSIPlesseyChecksumAlgorithm)msiPlesseyChecksumAlgorithm;
|
|
72
|
+
|
|
73
|
+
+ (void) setCodeDensity:(SBSDKBarcodeAdditionalParameters*)config
|
|
74
|
+
codeDencity:(SBSDKBarcodeDensity)codeDencity;
|
|
75
|
+
|
|
76
|
+
+ (void) setLowPowerMode:(SBSDKBarcodeScannerViewController*)controller
|
|
77
|
+
value:(BOOL)value;
|
|
78
|
+
|
|
79
|
+
+ (void) setMinimumTextLenght:(SBSDKBarcodeAdditionalParameters*)config
|
|
80
|
+
value:(int)value;
|
|
81
|
+
|
|
82
|
+
+ (void) setMaximumTextLenght:(SBSDKBarcodeAdditionalParameters*)config
|
|
83
|
+
value:(int)value;
|
|
84
|
+
|
|
85
|
+
+ (void) setMinimum1DBarcodesQuietZone:(SBSDKBarcodeAdditionalParameters*)config
|
|
86
|
+
value:(int)value;
|
|
87
|
+
|
|
88
|
+
+ (void) setStripCheckDigits:(SBSDKBarcodeAdditionalParameters*)config
|
|
89
|
+
value:(BOOL)value;
|
|
90
|
+
|
|
91
|
+
+ (NSString *) jsonFromResultOrNil:(NSArray<SBSDKBarcodeScannerResult *> *)codes;
|
|
92
|
+
|
|
93
|
+
+ (void) freezeCamera:(SBSDKBarcodeScannerViewController*)controller;
|
|
94
|
+
|
|
95
|
+
+ (void) unfreezeCamera:(SBSDKBarcodeScannerViewController*)controller;
|
|
96
|
+
|
|
97
|
+
@end
|
|
98
|
+
|
|
99
|
+
#endif /* RNScanbotBarcodeScannerViewHandler_h */
|