Label Capture Settings
Defined in framework ScanditLabelCapture
- LabelCaptureSettings
open class LabelCaptureSettings : NSObject, NSCopying
Added in version 6.0.0
Configures label capture parameters and defines the structure of labels to be captured. This settings object is central to the Smart Label Capture workflow, specifying which label definitions to use, recognition parameters, and capture behavior.
Key configuration aspects:
Label definitions - Defines field types (barcodes, dates, text) and their validation rules
Recognition parameters - Controls scanning behavior and accuracy
Location selection - Specifies scanning areas and constraints
Symbology settings - Configures which barcode types are enabled
The settings follow a fluent builder pattern for convenient configuration and support multiple label definitions to handle different types of labels in the same scanning session. For the settings to take effect, they must be applied to a label capture instance using the appropriate apply settings method.
- init
init(labelDefinitions definitions: Array<LabelDefinition>) throws
Added in version 6.21.0
Load the settings from an array of LabelDefinition.
LabelCaptureSettings offers a result builder pattern for creating settings with multiple label definitions.
let settings = try LabelCaptureSettings { LabelDefinition("weighted_definition") { CustomBarcode( name: "barcode", symbologies: [.ean13UPCA, .gs1DatabarExpanded, .code128] ) ExpiryDateText(name: "expiry_date") .labelDateFormat( LabelDateFormat( componentFormat: LabelDateComponentFormat.MDY, acceptPartialDates: false ) ) .optional(true) WeightText(name: "weight") .optional(true) UnitPriceText(name: "unit_price") .optional(true) } }
- init
convenience init(from definitions: Array<LabelDefinition>) throws
Added in version 6.21.0
Load the settings from an array of LabelDefinition
- init
init(labelDefinitions definitions: Array<LabelDefinition>, hiddenProperties dictionary: Dictionary<AnyHashable,
Any>?) throwsAdded in version 6.21.0
Load the settings from an array of LabelDefinition with optional hidden properties
- init
convenience init(from definitions: Array<LabelDefinition>, hiddenProperties dictionary: Dictionary<AnyHashable,
Any>?) throwsAdded in version 6.21.0
Load the settings from an array of LabelDefinition with optional hidden properties
- init
init(labelDefinitions definitions: Array<LabelDefinition>, hiddenProperties dictionary: Dictionary<AnyHashable,
Any>?, labelProperties: NSObject?) throwsAdded in version 7.2.0
Load the settings from an array of LabelDefinition with optional hidden properties and label properties.
- init
convenience init(from definitions: Array<LabelDefinition>, hiddenProperties dictionary: Dictionary<AnyHashable,
Any>?, labelProperties: NSObject?) throwsAdded in version 7.2.0
Load the settings from an array of LabelDefinition with optional hidden properties and label properties.
- locationSelection
open var locationSelection: (any LocationSelection)? { get, set }
Added in version 6.9.0
Defines the strategy with which to select one out of many visible labels. By default, this property is null and label selection is disabled.
Currently only RectangularLocationSelection is supported.
- set
open func set(value:
Any?, forProperty property: String) ->VoidAdded in version 6.3.0
Sets a 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 change in a future release.
- value
open func value(forProperty property: String) ->
Any?Added in version 6.3.0
Retrieves the value of a previously set property. In case the property does not exist, null is returned. Use this method to get properties that are not yet part of a stable API. These properties may change in a future release.
- settings
open func settings(for symbology: Symbology) -> SymbologySettings
Added in version 7.4.0
Get SymbologySettings specific for the given Symbology.
Note that modifying the returned object doesn’t automatically apply the changes to LabelCapture. After you made changes to the symbology settings, call LabelCapture.apply() with these LabelCaptureSettings to apply them.