Deprecation warning

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

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

Scanning Multiple Barcodes


Sometimes you can find several barcodes in the same package/pallet, with the Scandit Barcode Scanner you can scan all the codes at the same time, saving time and money. With very little code it is possible to get it.


To implement multiple barcode scanning

  • Set the code duplicated filter SBSScanSettings::codeDuplicateFilter to -1, so each unique code is only added once to the session.
  • Set the maximum number of codes to be decoded every frame SBSScanSettings::maxNumberOfCodesPerFrame
  • In the SBSScanDelegate::didScan function, wait unil the number of expected codes have been decoded, then store the codes and pause and clean the session.
SBSScanSettings* scanSettings = [SBSScanSettings defaultSettings];
//barcodes are filtered as duplicates
//if they match an already decoded barcode in the session
scanSettings.codeDuplicateFilter = -1;
//the maximum number of codes to be decoded every frame
scanSettings.maxNumberOfCodesPerFrame = 3;
#pragma mark - SBSScanDelegate
- (void)barcodePicker:(SBSBarcodePicker *)picker didScan:(SBSScanSession *)session {
// number of expected barcodes
int numExpectedCodes = 3;
// get all the scanned barcodes from the session
NSArray *allCodes = session.allRecognizedCodes;
// if the number of scanned codes is greater or equal than the number of expected barcodes
// pause the scanning and clear the session (to remove recognized barcodes).
if ([allCodes count] >= numExpectedCodes) {
// pause scanning and clear the session. The scanning itself is resumed
// when the user taps the screen.
[session pauseScanning];
[session clear];