Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for iOS

SBSBarcodePicker.h
Go to the documentation of this file.
1 //
2 // SBSBarcodePicker.h
3 // ScanditBarcodeScanner
4 //
5 // Created by Marco Biasini on 12/06/15.
6 // Copyright (c) 2015 Scandit AG. All rights reserved.
7 //
8 
9 #import <UIKit/UIKit.h>
10 #import <AVFoundation/AVFoundation.h>
11 #import <CoreGraphics/CoreGraphics.h>
12 #import <CoreVideo/CoreVideo.h>
13 #import <CoreMedia/CoreMedia.h>
14 #import "SBSCommon.h"
15 #import "SBSParser.h"
16 #import "SBSParserDataFormat.h"
17 
18 
19 @class SBSScanSession;
20 @class SBSScanSettings;
21 @class SBSBarcodePicker;
23 @protocol SBSPropertyObserver;
24 
32 
50 - (void)barcodePicker:(nonnull SBSBarcodePicker*)barcodePicker
51  didProcessFrame:(nonnull CMSampleBufferRef)frame
52  session:(nonnull SBSScanSession*)session;
53 
54 @end
55 
65 @protocol SBSScanDelegate
66 
83 - (void)barcodePicker:(nonnull SBSBarcodePicker*)picker didScan:(nonnull SBSScanSession*)session;
84 
85 @end
86 
127 @interface SBSBarcodePicker : UIViewController
128 
142 @property (nonatomic, assign) UIInterfaceOrientationMask allowedInterfaceOrientations;
143 
152 @property (nonnull, nonatomic, strong) SBSOverlayController *overlayController;
153 
165 @property (nullable, nonatomic, weak) id<SBSScanDelegate> scanDelegate;
166 
177 @property (nullable, nonatomic, weak) id<SBSProcessFrameDelegate> processFrameDelegate;
178 
184 @property (readonly, nonatomic) SBSCameraFacingDirection cameraFacingDirection;
185 
197 @property (nonatomic, assign) AVCaptureVideoOrientation cameraPreviewOrientation;
198 
205 @property (nonatomic, assign) BOOL autoFocusOnTapEnabled;
206 
216 @property (nonatomic, assign) BOOL pinchToZoomEnabled;
217 
234 - (nonnull instancetype)initWithSettings:(nullable SBSScanSettings *)settings SBS_DESIGNATED_INITIALIZER;
235 
238 
254 - (void)applyScanSettings:(nonnull SBSScanSettings*)settings
255  completionHandler:(nullable void (^)(void))handler;
256 
258 
269 - (void)addPropertyObserver:(nullable id<SBSPropertyObserver>)observer SBS_SWIFT_NAME(addPropertyObserver(_:));
270 
280 - (void)removePropertyObserver:(nullable id<SBSPropertyObserver>)observer SBS_SWIFT_NAME(removePropertyObserver(_:));
281 
284 
297 - (void)startScanning;
298 
314 - (void)startScanningInPausedState:(BOOL)paused;
315 
334 - (void)startScanningInPausedState:(BOOL)paused completionHandler:(nullable void (^)(void))handler;
335 
346 - (void)stopScanningWithCompletionHandler:(nullable void (^)(void))handler;
347 
357 - (void)stopScanning;
358 
372 - (void)resumeScanning;
373 
389 - (void)resumeScanningWithCompletionHandler:(nullable void (^)(void))handler;
390 
402 - (void)pauseScanning;
403 
417 - (void)pauseScanningWithCompletionHandler:(nullable void (^)(void))handler;
418 
420 
423 
441 - (CGPoint)convertPointToPickerCoordinates:(CGPoint)point;
442 
444 
452 - (BOOL)isScanning;
453 
455 
458 
468 - (BOOL)supportsCameraFacing:(SBSCameraFacingDirection)facing;
469 
478 - (BOOL)changeToCameraFacing:(SBSCameraFacingDirection)facing;
479 
487 - (BOOL)switchCameraFacing;
489 
492 
505 - (void)switchTorchOn:(BOOL)on;
507 
510 
523 - (BOOL)setRelativeZoom:(float)zoom;
525 
528 
542 - (nullable SBSParser *)parserForFormat:(SBSParserDataFormat)dataFormat error:(NSError * _Nullable * _Nullable)outError;
544 
545 @end
void resumeScanning()
Resume scanning codes.
void pauseScanning()
Pause scanning but keep preview on.
Controls the camera and orchestrates the barcode scanning process.
Definition: SBSBarcodePicker.h:127
BOOL pinchToZoomEnabled
Whether pinch to zoom is enabled.
Definition: SBSBarcodePicker.h:216
SBSCameraFacingDirection
Definition: SBSCommon.h:40
controls the scan screen user interface.
Definition: SBSOverlayController.h:103
BOOL autoFocusOnTapEnabled
Whether tapping on the screen should trigger an auto-focus.
Definition: SBSBarcodePicker.h:205
id< SBSScanDelegate > scanDelegate
The scan delegate for this barcode picker.
Definition: SBSBarcodePicker.h:165
Holds settings that affect the recognition of barcodes, such as enabled barcode symbologies, scanning hot spot etc.
Definition: SBSScanSettings.h:29
Defines the Protocol for a scan event delegate.
Definition: SBSBarcodePicker.h:65
void startScanning()
Starts/restarts the camera and the scanning process.
SBSCameraFacingDirection cameraFacingDirection
The facing direction of the used camera.
Definition: SBSBarcodePicker.h:184
Protocol for accessing the processed sample buffers.
Definition: SBSBarcodePicker.h:31
Holds all barcodes that were decoded in the current session.
Definition: SBSScanSession.h:39
Defines the interface for a data string parser. Parsers are capable of parsing one particular data fo...
Definition: SBSParser.h:62
id< SBSProcessFrameDelegate > processFrameDelegate
The process frame delegate for this barcode picker.
Definition: SBSBarcodePicker.h:177
BOOL switchCameraFacing()
Changes to the opposite camera facing if it is supported.
SBSOverlayController * overlayController
The overlay controller controls the scan user interface.
Definition: SBSBarcodePicker.h:152
AVCaptureVideoOrientation cameraPreviewOrientation
The orientation of the camera preview.
Definition: SBSBarcodePicker.h:197
UIInterfaceOrientationMask allowedInterfaceOrientations
Orientations that the barcode picker is allowed to rotate to.
Definition: SBSBarcodePicker.h:142
BOOL isScanning()
Returns YES if scanning is in progress.
void stopScanning()
Stop scanning and the video preview.