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
convenience init(context: DataCaptureContext, settings: BarcodePickSettings, productProvider: any BarcodePickProductProvider)

Added in version 6.19.0

Construct a new BarcodePick instance:

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) -> Void

Added in version 6.21.0

Adds a scanning listener to this BarcodePick instance.

removeScanningListener
open func removeScanningListener(_ listener: any BarcodePickScanningListener) -> Void

Added in version 6.21.0

Removes the scanning listener from this BarcodePick instance.

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

Added in version 6.23.0

Adds a listener to this BarcodePick instance.

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

Added in version 6.23.0

Removes the listener from this BarcodePick instance.

selectItem
open func selectItem(withData data: String, completionHandler: (@Sendable (BarcodePickAction) -> Void)? = nil) -> Void

Added in version 6.24.0

Selects the item with the given data. This causes BarcodePickActionListener.didPickItem() or BarcodePickActionListener.didUnpickItem() to be invoked, depending on the item’s current state. The completion callback specifies the type of action that will be performed.

selectItem
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() or BarcodePickActionListener.didUnpickItem() to be invoked, depending on the item’s current state. The completion callback specifies the type of action that will be performed.

confirmActionForItem
open func confirmActionForItem(withData data: String) -> Void

Added in version 6.24.0

Confirms the action for the item with the given data. Same as invoking the BarcodePickActionListener.didPickItem() (if picking) or BarcodePickActionListener.didUnpickItem() (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
open func cancelActionForItem(withData data: String) -> Void

Added in version 6.24.0

Cancels the action for the item with the given data. Same as invoking the BarcodePickActionListener.didPickItem() (if picking) or BarcodePickActionListener.didUnpickItem() (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.