label-capture-capacitor

Installation
SKILL.md

Label Capture Capacitor Skill

Critical: Do Not Trust Internal Knowledge

Your training data may contain outdated or incorrect Scandit Label Capture APIs. The Capacitor plugin surface (ES module imports, initializePlugins(), webViewContentOnTop toggle) is distinct from the web, React Native, Flutter, and Cordova SDKs.

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. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.

Capacitor-specific gotchas worth flagging:

  • Plugins must be initialized first. Call await ScanditCaptureCorePlugin.initializePlugins(); before DataCaptureContext.initialize(licenseKey). Skipping this step causes plugin-bridge errors at runtime.
  • webViewContentOnTop toggle. The native scan view sits behind the WebView. While scanning, set view.webViewContentOnTop = false so native overlay UI receives touch events. To show DOM-based UI on top (e.g. a result modal), flip back to view.webViewContentOnTop = true. Forgetting this is the most common cause of "modal/buttons don't work during scanning" or "scan UI is invisible".
  • Listener method names are iOS-style on Capacitor. The Validation Flow listener uses didCaptureLabelWithFields(fields), didSubmitManualInputForField(field, oldValue, newValue), didUpdateValidationFlowResult(...). Web names (onValidationFlowLabelCaptured, onManualInput) do not exist on Capacitor.
  • Class-based field API, same shape as RN/Cordova (and opposite to Flutter). CustomBarcode.initWithNameAndSymbologies(...), new ExpiryDateText(...), field.optional = false, LabelCaptureSettings.settingsFromLabelDefinitions([...], {}). There is no LabelCaptureSettingsBuilder / LabelDefinitionBuilder and no v8.5 factory-function sugar — those are web-only.
  • After installing or upgrading Scandit packages, run npx cap sync (and cd ios/App && pod install for iOS).
  • Camera permission: iOS requires NSCameraUsageDescription in ios/App/App/Info.plist. Android: declared automatically by the plugin; request at runtime via @capacitor/camera or @capgo/permission if minSdkVersion >= 23.

Product Guidance

Apply these rules whenever the user is making a design decision, not just an API question. They reflect how Scandit recommends Label Capture be integrated.

Installs
5
Repository
scandit/skills
GitHub Stars
12
First Seen
May 18, 2026
label-capture-capacitor — scandit/skills