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.

Intent Routing

  • Integrating Label Capture from scratch → read references/integration.md.
Related skills

More from scandit/scandit-sdk-skills

Installs
3
GitHub Stars
10
First Seen
Apr 28, 2026