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 "SBSBarcodeGenerator.h"
15 #import "SBSCommon.h"
16 #import "SBSParser.h"
17 #import "SBSParserDataFormat.h"
18 
19 
20 @class SBSScanSession;
21 @class SBSScanSettings;
22 @class SBSBarcodePicker;
24 @protocol SBSPropertyObserver;
25 
33 
51 - (void)barcodePicker:(nonnull SBSBarcodePicker *)barcodePicker
52  didProcessFrame:(nonnull CMSampleBufferRef)frame
53  session:(nonnull SBSScanSession *)session;
54 
55 @end
56 
66 @protocol SBSScanDelegate
67 
84 - (void)barcodePicker:(nonnull SBSBarcodePicker *)picker didScan:(nonnull SBSScanSession *)session;
85 
86 @end
87 
89 
100 - (void)barcodePicker:(nonnull SBSBarcodePicker *)picker failedToValidateLicense:(nonnull NSString *)errorMessage;
101 
102 @end
103 
144 @interface SBSBarcodePicker : UIViewController
145 
159 @property (nonatomic, assign) UIInterfaceOrientationMask allowedInterfaceOrientations;
160 
169 @property (nonnull, nonatomic, strong) SBSOverlayController *overlayController;
170 
182 @property (nullable, nonatomic, weak) id<SBSScanDelegate> scanDelegate;
183 
194 @property (nullable, nonatomic, weak) id<SBSProcessFrameDelegate> processFrameDelegate;
195 
205 @property (nullable, nonatomic, weak) id<SBSLicenseValidationDelegate> licenseValidationDelegate;
206 
212 @property (readonly, nonatomic) SBSCameraFacingDirection cameraFacingDirection;
213 
225 @property (nonatomic, assign) AVCaptureVideoOrientation cameraPreviewOrientation;
226 
233 @property (nonatomic, assign) BOOL autoFocusOnTapEnabled;
234 
244 @property (nonatomic, assign) BOOL pinchToZoomEnabled;
245 
262 - (nonnull instancetype)initWithSettings:(nullable SBSScanSettings *)settings SBS_DESIGNATED_INITIALIZER;
263 
266 
282 - (void)applyScanSettings:(nonnull SBSScanSettings *)settings
283  completionHandler:(nullable void (^)(void))handler;
284 
286 
297 - (void)addPropertyObserver:(nullable id<SBSPropertyObserver>)observer SBS_SWIFT_NAME(addPropertyObserver(_:));
298 
308 - (void)removePropertyObserver:(nullable id<SBSPropertyObserver>)observer SBS_SWIFT_NAME(removePropertyObserver(_:));
309 
312 
325 - (void)startScanning;
326 
342 - (void)startScanningInPausedState:(BOOL)paused;
343 
362 - (void)startScanningInPausedState:(BOOL)paused completionHandler:(nullable void (^)(void))handler;
363 
374 - (void)stopScanningWithCompletionHandler:(nullable void (^)(void))handler;
375 
385 - (void)stopScanning;
386 
400 - (void)resumeScanning;
401 
417 - (void)resumeScanningWithCompletionHandler:(nullable void (^)(void))handler;
418 
430 - (void)pauseScanning;
431 
445 - (void)pauseScanningWithCompletionHandler:(nullable void (^)(void))handler;
446 
448 
451 
469 - (CGPoint)convertPointToPickerCoordinates:(CGPoint)point;
470 
472 
480 - (BOOL)isScanning;
481 
483 
486 
496 - (BOOL)supportsCameraFacing:(SBSCameraFacingDirection)facing;
497 
506 - (BOOL)changeToCameraFacing:(SBSCameraFacingDirection)facing;
507 
515 - (BOOL)switchCameraFacing;
517 
520 
533 - (void)switchTorchOn:(BOOL)on;
535 
538 
551 - (BOOL)setRelativeZoom:(float)zoom;
553 
556 
570 - (nullable SBSParser *)parserForFormat:(SBSParserDataFormat)dataFormat error:(NSError * _Nullable * _Nullable)outError;
572 
575 
592 - (nullable SBSBarcodeGenerator *)barcodeGeneratorForSymbology:(SBSSymbology)symbology error:(NSError * _Nullable * _Nullable)outError;
594 
595 @end
void resumeScanning()
Resume scanning codes.
Definition: SBSBarcodePicker.h:88
void pauseScanning()
Pause scanning but keep preview on.
Controls the camera and orchestrates the barcode scanning process.
Definition: SBSBarcodePicker.h:144
BOOL pinchToZoomEnabled
Whether pinch to zoom is enabled.
Definition: SBSBarcodePicker.h:244
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:233
id< SBSScanDelegate > scanDelegate
The scan delegate for this barcode picker.
Definition: SBSBarcodePicker.h:182
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:66
void startScanning()
Starts/restarts the camera and the scanning process.
SBSCameraFacingDirection cameraFacingDirection
The facing direction of the used camera.
Definition: SBSBarcodePicker.h:212
SBSSymbology
Enumerates the symbologies supported by Scandit Barcode Scanner.
Definition: SBSCode.h:44
Protocol for accessing the processed sample buffers.
Definition: SBSBarcodePicker.h:32
Holds all barcodes that were decoded in the current session.
Definition: SBSScanSession.h:39
A barcode generator.
Definition: SBSBarcodeGenerator.h:39
id< SBSLicenseValidationDelegate > licenseValidationDelegate
The license validation delegate for this barcode picker.
Definition: SBSBarcodePicker.h:205
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:194
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:169
AVCaptureVideoOrientation cameraPreviewOrientation
The orientation of the camera preview.
Definition: SBSBarcodePicker.h:225
UIInterfaceOrientationMask allowedInterfaceOrientations
Orientations that the barcode picker is allowed to rotate to.
Definition: SBSBarcodePicker.h:159
BOOL isScanning()
Returns YES if scanning is in progress.
void stopScanning()
Stop scanning and the video preview.