Barcode Count Settings
Defined in framework ScanditBarcodeCapture
- BarcodeCountSettings
open class BarcodeCountSettings : NSObject, NSCopying
Added in version 6.14.0
- init()
init()
Added in version 6.14.0
Creates a new barcode count settings instance. All symbologies are disabled. Make sure to enable the symbologies required by your app before applying the settings to BarcodeCount with BarcodeCount.apply(_:completionHandler:).
- init(scanPreviewEnabled:)
init(scanPreviewEnabled:
Bool)Added in version 8.1.0
Creates a new barcode count settings instance. This initializer allows enabling or disabling the scan preview at construction. When using the default initializer, scan preview is disabled by default.
Scan preview allows you to see the barcodes that are being detected before pressing the shutter button, but these won’t be added to the scanning result yet. Pressing the shutter button will scan the barcodes that are visible in the preview.
When scan preview is enabled, basic scanning, scanning against a list, status mode, group scanning, and the not-in-list action are supported. Filtering is not supported with scan preview.
Clustering is supported with limitations — see clusteringMode and expectedNumberOfBarcodesPerCluster.
Note
The Barcode Count scan preview API is still in beta and may change in future versions of Scandit Data Capture SDK.
- settings(for:)
open func settings(for symbology: Symbology) -> SymbologySettings
Added in version 6.14.0
Gets SymbologySettings specific for the given Symbology.
Note that modifying the returned object doesn’t automatically apply the changes to BarcodeCount. After you made changes to the symbology settings, call BarcodeCount.apply(_:completionHandler:) with these BarcodeCountSettings to apply them.
- EnabledSymbologies
var enabledSymbologies: Set<Symbology> { get }
Added in version 6.14.0
Returns the set of enabled symbologies.
- filterSettings
open var filterSettings: BarcodeFilterSettings { get, set }
Added in version 6.15.0
Returns the current settings for barcode filtering.
- enableSymbologies(_:)
func enableSymbologies(_ symbologies: Set<Symbology>) ->
VoidAdded in version 6.14.0
This function provides a convenient shortcut to enabling decoding of particular symbologies without having to go through SymbologySettings. By default, all symbologies are turned off and symbologies need to be explicitly enabled.
- set(symbology:enabled:)
open func set(symbology: Symbology, enabled:
Bool) ->VoidAdded in version 6.14.0
This function provides a convenient shortcut to enabling/disabling decoding of a particular symbology without having to go through SymbologySettings.
Note
Some 1d barcode symbologies allow you to encode variable-length data. By default, the Scandit Data Capture SDK only scans barcodes in a certain length range.
If your application requires scanning of one of these symbologies, and the length is falling outside the default range, you may need to adjust the active symbol counts for the symbology in addition to enabling it.
- expectsOnlyUniqueBarcodes
open var expectsOnlyUniqueBarcodes:
Bool{ get, set }Added in version 6.14.0
Declares whether or not the barcodes to be tracked are expected to be unique. If enabled optimizations can be used to improve Barcode Count.
Default value is false.
Note
Do not enable this if you are expecting to scan multiple barcodes with the same content within one batch.
- disableModeWhenCaptureListCompleted
open var disableModeWhenCaptureListCompleted:
Bool{ get, set }Added in version 6.17.0
Declares whether or not the mode will be disabled automatically when the provided capture list has been completed. If no list has been provided, this has no effect.
Default value is false.
- set(value:forProperty:)
open func set(value:
Any, forProperty property: String) ->VoidAdded in version 6.14.0
Sets property to the provided value. Use this method to set properties that are not yet part of a stable API. Properties set through this method may or may not be used or change in a future release.
- value(forProperty:)
open func value(forProperty property: String) ->
Any?Added in version 6.14.0
Retrieves the value of a previously set property.
- mappingEnabled
open var mappingEnabled:
Bool{ get, set }Added in version 6.17.0
Use this property to enable barcode mapping.
Default value is false.
Note
The Barcode Count mapping API is still in beta and may change in future versions of Scandit Data Capture SDK.
- clusteringMode
open var clusteringMode: ClusteringMode { get, set }
Added in version 7.1.0
Clustering mode allows smart grouping of neighbouring barcodes. Default to ClusteringMode.disabled.
Note
Cluster editing is not available when scan preview is enabled. ClusteringMode.manual and ClusteringMode.autoWithManualCorrection are treated as ClusteringMode.auto, so this property reads back as ClusteringMode.auto, and clusters cannot be created or dissolved.
- automaticClusteringMethod
var automaticClusteringMethod: AutomaticClusteringMethod? { get, set }
Added in version 8.6.0
The method used to form clusters when clusteringMode is ClusteringMode.auto or ClusteringMode.autoWithManualCorrection. When nil, vicinity-based clustering is used for backward compatibility. The configured value is retained but has no effect while clustering mode is ClusteringMode.disabled or ClusteringMode.manual.
Defaults to nil.
Note
When scan preview is enabled, clusters are always formed using AutomaticClusteringMethod.label, regardless of the configured value.
- expectedNumberOfBarcodesPerCluster
var expectedNumberOfBarcodesPerCluster:
Int? { get, set }Added in version 8.5.0
If set, every cluster is expected to contain exactly this many barcodes. Clusters whose barcode count does not match are flagged as ClusterExpectationStatus.deviates and rendered with a red default brush (or with the brush returned by the cluster brush callback, when implemented). When nil, no expectation is enforced and every cluster reports ClusterExpectationStatus.notEvaluated.
Defaults to nil.
Note
When scan preview is enabled, 2 is used when this property is nil. Only clusters that contain exactly the expected number of barcodes are formed.
- groupScanningEnabled
open var groupScanningEnabled:
Bool{ get, set }Added in version 8.5.0
When enabled, the BarcodeCount UI displays additional Next Group and Redo controls so the user can split a long scanning session into multiple groups and discard the current group. Scans are still returned as a flat list through the existing listener APIs — there is no grouped-result callback.
Default value is false.
- scanPreviewEnabled
open var scanPreviewEnabled:
Bool{ get }Added in version 8.1.0
Returns the state of the scan preview. Can only be set during initialization.