Speed up SparkScan integration with Agent Skills
Install the Scandit plugin and use the /sparkscan-net-ios skill so that your AI coding agent can integrate, debug, and customize SparkScan on .NET iOS following Scandit's recommended patterns. More info →
Run the following command in your project directory. It detects the supported coding agents you have installed and adds the Scandit plugin to each. Re-run it to update.
npx plugins add scandit/skillsPrefer to set it up yourself? Manual installation steps for each agent →
SparkScan settings reference
This page lists the SparkScan settings and view properties in .NET iOS, with their defaults and allowed values as the API reference states them. A blank default means the API reference states none. For what the workflow settings do for your users, see How SparkScan works.
Options
SparkScanSettings
Set these on SparkScanSettings. To change them on a running SparkScan, call SparkScan.ApplySettingsAsync().
| Name | Type | Default | Values | What it does |
|---|---|---|---|---|
SelectionMode | SelectionMode | Auto | Auto, Off, On | Whether users confirm the aimed barcode before it's scanned. Added in 8.5.0. |
ScanIntention | ScanIntention | Smart | Smart, Manual | The scan intention algorithm. While SelectionMode is On, the value is kept but doesn't take effect. |
CodeDuplicateFilter | TimeSpan | -2 (CodeDuplicate.DefaultDuplicateFilter) | -2, -1, 0, or a positive interval | The interval in which a barcode with the same symbology and data counts as a duplicate. -2 depends on ScanIntention, -1 reports a code only once until scanning stops, and 0 reports every detection. If you keep the default and turn the selection mode On, SparkScan doesn't filter duplicates, so users can select the same barcode again. |
BatterySaving | BatterySavingMode | Auto | Auto, On, Off | The battery saving mode. Auto turns battery saving on when the device uses more battery than usual. |
EnabledSymbologies | ICollection<Symbology> | Empty | The enabled symbologies. Read-only. All symbologies are off until you enable them. | |
EnableSymbology() | Method | Turns one symbology on or off. | ||
EnableSymbologies() | Method | Turns on a collection of symbologies. An overload that takes a CompositeType turns on the symbologies that composite type needs; it was added in 8.3.0. | ||
GetSymbologySettings() | Method | Returns the SymbologySettings of one symbology, for example to change its active symbol counts. | ||
EnabledCompositeTypes | CompositeType | CompositeType flags | The composite codes to scan. Also enable the symbologies they're made of. Added in 8.3.0. |
SparkScanViewSettings
Set these on SparkScanViewSettings before you create the SparkScanView.
| Name | Type | Default | Values | What it does |
|---|---|---|---|---|
ScanningBehavior | SparkScanScanningBehavior | Single | Single, Continuous | Whether the view scans one barcode per trigger or keeps scanning. Added in 8.7.0. |
PreviewBehavior | SparkScanPreviewBehavior | Default | Default, Persistent | Whether the mini preview hides or stays visible when the scanner isn't scanning. Added in 8.7.0. |
HoldToScanEnabled | bool | true | Whether the view keeps scanning while users hold the trigger button. Ignored while SelectionMode is On. | |
HardwareTriggerEnabled | bool | false | Whether the volume button starts scanning. | |
TriggerButtonCollapseTimeout | TimeSpan | 5 seconds | A negative value means no timeout | The time after which the view returns to its idle state and collapses the trigger button. |
InactiveStateTimeout | TimeSpan | 10 seconds | The time after which the view stops capturing. | |
DefaultMiniPreviewSize | SparkScanMiniPreviewSize | Regular | Regular, Expanded | The size of the mini preview when it first shows. |
DefaultTorchState | TorchState | Off | On, Off, Auto | The torch state when the camera starts. With Auto, the view hides the torch control. |
DefaultCameraPosition | CameraPosition | WorldFacing | WorldFacing, UserFacing, Unspecified | The camera the view starts with. In beta. |
ZoomFactorOut | float | 1 | The camera's zoom factor. | |
ZoomFactorIn | float | 2 | The zoom factor after users tap the zoom switch control. | |
SoundEnabled | bool | true | Whether the scan feedback plays a sound. | |
HapticEnabled | bool | true | Whether the scan feedback vibrates. | |
VisualFeedbackEnabled | bool | true | Whether the view shows visual feedback after a scan. | |
SelectionModeCandidateBrush | Brush? | The brush for candidate barcodes while SelectionMode is Auto. When null, the view uses the default brush. Added in 8.5.0. | ||
ToastSettings | SparkScanToastSettings | The text, colors and visibility of the toast messages. |
SparkScanView properties
Set these on the SparkScanView instance.
| Name | Type | Default | Values | What it does |
|---|---|---|---|---|
Feedback | ISparkScanFeedbackDelegate | The delegate that returns a success or error feedback for each barcode. Without one, the view emits the success feedback. | ||
TriggerButtonVisible | bool | true | Whether the trigger button shows. | |
TriggerButtonImage | Image? | The image in the trigger button. | ||
TriggerButtonCollapsedColor | Color? | The background color of the collapsed trigger button. | ||
TriggerButtonExpandedColor | Color? | The background color of the expanded trigger button. | ||
TriggerButtonAnimationColor | Color? | The color of the pulsing animation around the trigger button while the scanner is active. | ||
TriggerButtonTintColor | Color? | The tint color of the trigger button. | ||
PreviewSizeControlVisible | bool | true | Whether the mini preview size control shows. | |
PreviewCloseControlVisible | bool | true | Whether the mini preview close control shows. | |
TorchControlVisible | bool | true | Whether the torch control shows. Hidden when DefaultTorchState is Auto. | |
ZoomSwitchControlVisible | bool | true | Whether the zoom switch control shows. | |
ScanningBehaviorButtonVisible | bool | false | Whether the toolbar shows the scanning behavior button. | |
SelectionModeButtonVisible | bool | false | Whether the toolbar shows the button that switches SelectionMode between On and Off. Added in 8.5.0. | |
CameraSwitchButtonVisible | bool | false | Whether the toolbar shows the camera switch button. In beta. | |
BarcodeCountButtonVisible | bool | false | Whether the toolbar shows the MatrixScan Count button. | |
BarcodeFindButtonVisible | bool | false | Whether the toolbar shows the MatrixScan Find button. | |
LabelCaptureButtonVisible | bool | false | Whether the toolbar shows the Smart Label Capture button. Added in 8.3.0. | |
ToolbarBackgroundColor | Color? | #121619CC | The background color of the toolbar. | |
ToolbarIconActiveTintColor | Color? | #FBC02C | The color of active toolbar icons. | |
ToolbarIconInactiveTintColor | Color? | #FFFFFF | The color of inactive toolbar icons. | |
DefaultBrush | Brush | The default brush that highlights barcodes. Static and read-only. |
Framework differences
In .NET iOS, these options differ from the other SparkScan frameworks:
SparkScanViewraises events, such asViewStateChangedandBarcodeCountButtonTapped, instead of taking a UI listener.ScanningBehaviorandPreviewBehaviorwere added in 8.7.0. On iOS, Android and Web, they were added in 8.5.0.LabelCaptureButtonVisiblewas added in 8.3.0, later than on iOS and Android.HardwareTriggerEnabledstarts scanning with the volume button only. On .NET Android, you pick the button withHardwareTriggerKeyCode.- The API reference states the toolbar color defaults:
#121619CC,#FBC02Cand#FFFFFF. For .NET Android, it statesnull.