Skip to main content

Barcode Scanner | iOS Barcode Scanner

Barcode and QR-Code Scanner#

The Scanbot Barcode Scanner SDK provides the ability to scan and extract content from 1D and 2D barcodes. You can use the mobile device's camera for live scanning (CMSampleBufferRef) or other image sources like still images from the photo library (UIImage).

See the API of the class SBSDKBarcodeScanner.

UI Components#

RTU UI Components#

The Ready-To-Use UI (RTU UI) is a set of easy to integrate and customize high-level UI components (View Controllers). The design and behavior of these RTU UI View Controllers are based on our many years of experience as well as the feedback from our SDK customers. The Scanbot Barcode Scanner SDK provides such an RTU UI ViewController SBSDKUIBarcodeScannerViewController for Barcode and QR-Code scanning.


  • UI: All colors and text resources (localization)
  • Behavior: Enable or disable features like Beep Sound, Flashlight

Please note: The main idea of the RTU UI is to provide simple-to-integrate and simple-to-customize View Controllers. Due to this idea there are some limitations with the possibilities of customization. If you need more customization options you have to implement custom View Controllers using our Classical UI Components.

RTU UI example:

func startRtuUiBarcodeScanner() {    let configuration = SBSDKUIMachineCodeScannerConfiguration.default()    configuration.uiConfiguration.finderHeight = 0.5    configuration.uiConfiguration.finderWidth = 1    configuration.uiConfiguration.topBarBackgroundColor =    configuration.behaviorConfiguration.isSuccessBeepEnabled = true    configuration.behaviorConfiguration.barcodeImageGenerationType = .fromVideoFrame    // ... adjust further configs
    let scanner = SBSDKUIBarcodeScannerViewController.createNew(withAcceptedMachineCodeTypes: nil, configuration: configuration, andDelegate: self)
    self.present(scanner, animated: true, completion: nil)}
extension ViewController: SBSDKUIBarcodeScannerViewControllerDelegate {    func qrBarcodeDetectionViewController(_ viewController: SBSDKUIBarcodeScannerViewController,                                          didDetect barcodeResults: [SBSDKBarcodeScannerResult]) {        // TODO handle barcode results ...    }
    func qrBarcodeDetectionViewController(_ viewController: SBSDKUIBarcodeScannerViewController,                                          didCaptureBarcodeImage barcodeImage: UIImage?,                                          imageURL: URL?) {        // TODO handle optional barcode image result ...    }}

Classical UI Components#

Our Classical UI Components allows you to build your custom UI View Controllers which are very flexible and fully customizable. It is a set of easy to integrate and customize View Controllers which can be embedded and extended in your custom View Controllers.

Use the SBSDKBarcodeScannerViewController to build a custom scanner UI for Barcode and QR-Code scanning.


  • UI: Fully customizable
  • Behavior: Fully customizable

Full Examples#

Please see the example project in our GitHub repository scanbot-barcode-scanner-sdk-example-ios for both approaches, RTU UI and Classical UI.