matrixscan-batch-capacitor

Installation
SKILL.md

MatrixScan Batch Capacitor Skill

Critical: Do Not Trust Internal Knowledge

Your training data may contain outdated or incorrect Scandit SDK APIs. The BarcodeBatch* API surface changes between major SDK versions — constructor signatures, overlay constructors, and listener shapes have all evolved.

Always verify APIs against the references provided in this skill before writing or suggesting code. Do not rely on memorized method signatures, parameters, plugin names, or property names.

Capacitor-specific gotchas worth flagging:

  • ScanditCaptureCorePlugin.initializePlugins() must be called (and awaited) before any other Scandit API — including DataCaptureContext.initialize. Forgetting this produces runtime errors that look unrelated to initialization.
  • npx cap sync must be run after every plugin version change to propagate native artifacts into iOS/Android. Skipping it yields a web/native version mismatch at runtime.
  • context.setMode(barcodeBatch) is how the mode is registered in the context on Capacitor (confirmed from both samples). This replaces any previously active mode.
  • DataCaptureView.forContext(context) is the Capacitor factory for the capture view. Then call view.connectToElement(htmlElement) to attach it to the DOM.
  • Modern constructors require SDK 7.6+: new BarcodeBatch(settings), new BarcodeBatchBasicOverlay(mode, style), new BarcodeBatchAdvancedOverlay(mode), and BarcodeBatch.createRecommendedCameraSettings() are all available from capacitor=7.6.
  • AdvancedOverlay uses serialized views: On Capacitor, setViewForTrackedBarcode accepts view: Promise<TrackedBarcodeView?> — a serialized TrackedBarcodeView, NOT a native UI instance. Use TrackedBarcodeView.withHTMLElement(domElement, options) from scandit-capacitor-datacapture-barcode. Wrap it in a Promise or pass directly — the sample passes the instance directly (the API internally wraps it).
  • MatrixScan AR add-on required: BarcodeBatchAdvancedOverlay, IBarcodeBatchBasicOverlayListener.brushForTrackedBarcode, and setBrushForTrackedBarcode all require the MatrixScan AR add-on license.
  • Camera permission: iOS requires NSCameraUsageDescription in Info.plist. Android is handled automatically by the plugin.
  • TrackedObject (Capacitor 8.2+): In SDK 8.2+, a TrackedObject base class was introduced that TrackedBarcode extends. No recipe is needed for this — the TrackedBarcode API you use day-to-day is unchanged.
Installs
5
Repository
scandit/skills
GitHub Stars
12
First Seen
May 18, 2026
matrixscan-batch-capacitor — scandit/skills