SparkScan
Defined in framework ScanditBarcodeCapture
- SDCSparkScan
@interface SDCSparkScan : NSObject
Added in version 6.8.0
Capture mode that implements SparkScan.
This capture mode uses the barcode scanning capability. It cannot be used together with other capture modes that require the same capabilities, e.g. SDCBarcodeCapture.
- - init
- (instancetype)init
Added in version 6.16.0
Construct a new SparkScan mode with default settings.
- - initWithSettings:
- (instancetype)initWithSettings:(nonnull SDCSparkScanSettings *)settings
Added in version 6.16.0
Construct a new SparkScan mode with the provided settings.
- + sparkScanFromJSONString:error:
+ (nullable
instancetype
)sparkScanFromJSONString:(nonnull NSString *)JSONString error:(NSError **)errorAdded in version 6.16.0
Construct a new SparkScan mode from the provided json. Check SDCSparkScanDeserializer for more info.
- enabled
@property (nonatomic, assign, getter=isEnabled)
BOOL
enabledAdded in version 6.8.0
This flag indicates whether the SparkScan mode is currently processing frames to recognise barcodes.
Changing this property from NO to YES causes the connected SDCSparkScanView to start its scanning flow.
Changing this property from YES to NO causes the connected SDCSparkScanView to stop its scanning flow and go to idle mode.
- - applySettings:completionHandler:
- (
void
)applySettings:(nonnull SDCSparkScanSettings *)settings completionHandler:(nullable void (^)(void
))completionHandlerAdded in version 6.8.0
Asynchronously applies the new settings to the barcode scanner. 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.
- context
@property (nonatomic, nullable, readonly) SDCDataCaptureContext *context
Added in version 6.8.0
The context this mode is attached to. When the data capture mode is not attached to a context, nil is returned.
- - addListener:
- (
void
)addListener:(nonnull id<SDCSparkScanListener>)listenerAdded in version 6.8.0
Adds the listener to this SparkScan instance.
In case the same listener is already observing this instance, calling this method will not add the listener again. The listener is stored using a weak reference and must thus be retained by the caller for it to not go out of scope.
- - removeListener:
- (
void
)removeListener:(nonnull id<SDCSparkScanListener>)listenerAdded in version 6.8.0
Removes a previously added listener from this SparkScan instance.
In case the listener is not currently observing this instance, calling this method has no effect.
- sparkScanLicenseInfo
@property (nonatomic, nullable, readonly) SDCSparkScanLicenseInfo *sparkScanLicenseInfo
Added in version 6.12.0
The object containing information about SparkScan licensing.
Note
This value is available with a small delay. To make sure it is available, set a SDCDataCaptureContextListener and, as soon as SDCDataCaptureContextListener.context:didAddMode: is called, this license object is available.