Configure the scanner's key settings

Enable barcode symbologies supported by your application.

By default, all barcode symbologies are disabled and you will have to specify the list of symbologies you would like to scan when instantiating the barcode picker. To optimize the barcode decoding performance, we recommend that you only enable symbologies required by your application.

The following sample enables decoding of retail symbologies, more specifically EAN-13/UPC-A, UPC-E and EAN-8.

Objective-C:

// get the default settings with all symbologies disabled
//By default, all symbologies are turned off so you need to explicitly enable the desired symbologies.
NSSet *symbologiesToEnable = [NSSet setWithObjects:
@(SBSSymbologyEAN13) ,
@(SBSSymbologyQR), nil];
[settings enableSymbologies:symbologiesToEnable];

Swift

// get the default settings with all symbologies disabled
let settings = SBSScanSettings.default()
//By default, all symbologies are turned off so you need to explicitly enable the desired symbologies.
let symbologies: Set<SBSSymbology> = [.ean8, .ean13, .qr]
for symbology in symbologies {
settings.setSymbology(symbology, enabled: true)
}


Restrict the scan area

This can be useful if you hide part of the preview or want to scan barcodes only in a certain area of the preview. The implementation of it is explained here: Define the scanning area.


Customize the scan UI

The Scandit plugin enables you to change different aspects of the UI - you can crop the preview, display/hide the torch button or turn the sound of the scanner on/off. Have a look at Customize the scan UI for more information.


Set a symbology's extension

Some barcode symbologies support optional extensions such as inverted colors (printed white on black) and different symbology lengths. These options are set through SBSSymbologySettings.

Have a look at Change the length of barcodes to decode to see how to set a symbology's extension.