Barcode Count

Defined in framework ScanditBarcodeCapture

BarcodeCount
open class BarcodeCount : NSObject, DataCaptureMode

Added in version 6.14.0

Barcode Count is a data capture mode that implements MatrixScan Count in use cases that include a counting workflow such as receiving, inventory count, and stock taking. MatrixScan Count is an out-of-the-box scan and count solution that enables faster and more accurate counting of multiple items at once.

Learn more on how to use Barcode Count in our Get Started guide.

init
convenience init(context: DataCaptureContext?, settings: BarcodeCountSettings)

Added in version 6.14.0

Constructs a new barcode count mode with the provided context and settings. When the context is not null, the capture mode is automatically added to the context.

isEnabled
open var isEnabled: Bool { get, set }

Added in version 6.14.0

Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.

apply
open func apply(_ settings: BarcodeCountSettings, completionHandler: (@Sendable () -> Void)? = nil) -> Void

Added in version 6.14.0

Asynchronously applies the new settings to the barcode scanner, then calls whenDone. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

apply
open func apply(_ settings: BarcodeCountSettings) async -> Void

Added in version 6.14.0

Asynchronously applies the new settings to the barcode scanner, then calls whenDone. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

addListener
open func addListener(_ listener: any BarcodeCountListener) -> Void

Added in version 6.14.0

Adds the listener to observe this barcode capture instance.

If the listener is already observing the barcode count instance, calling this method has no effect.

removeListener
open func removeListener(_ listener: any BarcodeCountListener) -> Void

Added in version 6.14.0

Removes a previously added listener from this barcode count instance.

If the listener is not currently observing the barcode count instance, calling this method has no effect.

reset
open func reset() -> Void

Added in version 6.14.0

Resets the session, effectively clearing the history of tracked and unscanned barcodes.

startScanningPhase
open func startScanningPhase() -> Void

Added in version 6.14.0

Starts the capture session. If the isEnabled is false, this call has no effect.

recommendedCameraSettings
open class var recommendedCameraSettings: CameraSettings { get }

Added in version 6.14.0

Returns the recommended camera settings for use with barcode count.

context
open var context: DataCaptureContext? { get }

Added in version 6.14.0

Implemented from DataCaptureMode. See DataCaptureMode.context.

feedback
open var feedback: BarcodeCountFeedback { get, set }

Added in version 6.14.0

Instance of BarcodeCountFeedback that is used by the barcode scanner to notify users about Success and Failure events.

The default instance of the Feedback will have both sound and vibration enabled. A default beep sound will be used for the sound.

endScanningPhase
open func endScanningPhase() -> Void

Added in version 6.15.0

Disables this mode and switches off the current FrameSource.

setCaptureList
open func setCaptureList(_ captureList: BarcodeCountCaptureList?) -> Void

Added in version 6.15.0

Enables “Scanning against a list” mode, which provides additional functionality when looking for a specific set of Barcodes.

setAdditionalBarcodes
open func setAdditionalBarcodes(_ additionalBarcodes: Array<Barcode>) -> Void

Added in version 6.16.0

Use this method to inject barcodes that will be used as partial scanning result. BarcodeCountView will consider these barcodes when updating the UI. Note that, if scanning against a list where multiple instances of the same barcode are expected, each entry in this list will only count as 1 towards the expected total. In order to specify that several instances of a barcode were scanned in previous sessions, this list should include one entry per each of those instances.

clearAdditionalBarcodes
open func clearAdditionalBarcodes() -> Void

Added in version 6.16.0

Clears the additional barcodes.

beginClusterEditing
open func beginClusterEditing() -> BarcodeClusterEditor?

Added in version 7.1.0

Creates an editor to programmatically edit clusters. It will temporarily pause manual clustering until BarcodeClusterEditor.endEditing() is called.

Returns null if BarcodeCountSettings.clusteringMode is set to ClusteringMode.disabled, or if another editor is already active.