ID Capture

Defined in framework ScanditIdCapture

enum IdCaptureErrorCode

Added in version 6.5.0

undefined

Added in version 6.5.0

Undefined error.

initializationError

Added in version 6.5.0

IdCapture Initialization error.

parsingError

Added in version 6.5.0

Parsing document fields failed.

IdCapture
open class IdCapture : NSObject, DataCaptureMode

Added in version 6.2.0

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

Added in version 6.2.0

Constructs a new IdCapture with the provided settings. When dataCaptureContext is not null, the mode is automatically added to it.

init
convenience init(fromJSONString JSONString: String, context: DataCaptureContext) throws

Added in version 6.6.0

Constructs a new IdCapture with the provided JSON serialization. The capture mode is automatically added to the context.

isEnabled
open var isEnabled: Bool { get, set }

Added in version 6.2.0

Implemented from DataCaptureMode. See DataCaptureMode.isEnabled.

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

Added in version 6.2.0

Adds the listener to this id capture instance.

In case the same listener is already observing this instance, calling this method will not add the listener again.

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

Added in version 6.2.0

Removes listener from this id capture instance.

In case the listener is not currently observing this instance, calling this method has no effect.

context
open var context: DataCaptureContext? { get }

Added in version 6.2.0

Implemented from DataCaptureMode. See DataCaptureMode.context.

feedback
open var feedback: IdCaptureFeedback { get, set }

Added in version 6.19.0

Instance of IdCaptureFeedback, determines what feedback (vibration, sound) should be emitted during the ID Capture process.

recommendedCameraSettings
open class var recommendedCameraSettings: CameraSettings { get }

Added in version 6.2.0

Gets the recommended camera settings to use with this mode.

reset
open func reset() -> Void

Added in version 6.6.0

Resets the ongoing scanning process. This method can be used to abandon scanning the back side of a document.

apply
open func apply(_ settings: IdCaptureSettings) -> Void

Added in version 6.18.0

Asynchronously applies the new settings to the ID Capture. 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.

externalTransactionId
open var externalTransactionId: String? { get, set }

Added in version 7.6.0

Sets or retrieves an external transaction ID. This ID is attached to ID scan analytics data, to be linkable to customer transactions. Set to null to clear the transaction ID.