Barcode Pick
Defined in framework ScanditBarcodeCapture
- enum BarcodePickAction
Added in version 6.24.0
An enumeration of possible actions.
- none
Added in version 6.24.0
No action.
- pick
Added in version 6.24.0
Pick action.
- unpick
Added in version 6.24.0
Unpick action.
- BarcodePick
open class BarcodePick : NSObject
Added in version 6.19.0
Capture mode that implements barcode pick.
- init(context:settings:productProvider:)
convenience init(context: DataCaptureContext, settings: BarcodePickSettings, productProvider: any BarcodePickProductProvider)
Added in version 6.19.0
Constructs a new BarcodePick instance:
dataCaptureContext A DataCaptureContext
settings An instance of BarcodePickSettings used to configure the mode.
productProvider The product provider responsible for retrieving and mapping products. Available product provider types: [BarcodePickAsyncMapperProductProvider]
- recommendedCameraSettings
open class var recommendedCameraSettings: CameraSettings { get }
Added in version 6.19.0
Returns the recommended camera settings to use with the mode.
- addScanningListener(_:)
open func addScanningListener(_ listener: any BarcodePickScanningListener) ->
VoidAdded in version 6.21.0
Adds a scanning listener to this BarcodePick instance.
- removeScanningListener(_:)
open func removeScanningListener(_ listener: any BarcodePickScanningListener) ->
VoidAdded in version 6.21.0
Removes the scanning listener from this BarcodePick instance.
- addListener(_:)
open func addListener(_ listener: any BarcodePickListener) ->
VoidAdded in version 6.23.0
Adds a listener to this BarcodePick instance.
- removeListener(_:)
open func removeListener(_ listener: any BarcodePickListener) ->
VoidAdded in version 6.23.0
Removes the listener from this BarcodePick instance.
- selectItem(withData:completionHandler:)
open func selectItem(withData data: String, completionHandler: (@Sendable (BarcodePickAction) ->
Void)? = nil) ->VoidAdded in version 6.24.0
Selects the item with the given data. This causes BarcodePickActionListener.didPickItem(withData:) or BarcodePickActionListener.didUnpickItem(withData:) to be invoked, depending on the item’s current state. The completion callback specifies the type of action that will be performed.
- selectItem(withData:)
open func selectItem(withData data: String) async -> BarcodePickAction
Added in version 6.24.0
Selects the item with the given data. This causes BarcodePickActionListener.didPickItem(withData:) or BarcodePickActionListener.didUnpickItem(withData:) to be invoked, depending on the item’s current state. The completion callback specifies the type of action that will be performed.
- confirmActionForItem(withData:)
open func confirmActionForItem(withData data: String) ->
VoidAdded in version 6.24.0
Confirms the action for the item with the given data. Same as invoking the BarcodePickActionListener.didPickItem(withData:) (if picking) or BarcodePickActionListener.didUnpickItem(withData:) (if unpicking) action callbacks passing true. Useful as an alternative in scenarios where using such callbacks is not practical. No action is performed if the item is not currently selected.
- cancelActionForItem(withData:)
open func cancelActionForItem(withData data: String) ->
VoidAdded in version 6.24.0
Cancels the action for the item with the given data. Same as invoking the BarcodePickActionListener.didPickItem(withData:) (if picking) or BarcodePickActionListener.didUnpickItem(withData:) (if unpicking) action callbacks passing false. Useful as an alternative in scenarios where using such callbacks is not practical. No action is performed if the item is not currently selected.