label-capture-cordova

Installation
SKILL.md

Label Capture Cordova Skill

Critical: Do Not Trust Internal Knowledge

Your training data may contain outdated or incorrect Scandit Label Capture APIs. The Cordova plugin surface (global Scandit.* namespace, deviceready gating, plugin install, platform prepare) is distinct from the web, React Native, Flutter, and Capacitor 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.

Cordova-specific gotchas worth flagging:

  • All Scandit code must run after deviceready. The Scandit.* global namespace is not populated until then. Wrap your initialization in document.addEventListener('deviceready', () => {...}, false);.
  • Listener method names are iOS-style on Cordova. The Validation Flow listener uses didCaptureLabelWithFields(fields) and didSubmitManualInputForField(field, oldValue, newValue) — NOT the web equivalents onValidationFlowLabelCaptured / onManualInput.
  • Class-based field API, same shape as RN/Capacitor (and opposite to Flutter). Use Scandit.CustomBarcode.initWithNameAndSymbologies(name, [...]), new Scandit.ExpiryDateText(name), field.optional = false, Scandit.LabelCaptureSettings.settingsFromLabelDefinitions([...], {}). There is no LabelCaptureSettingsBuilder / LabelDefinitionBuilder and no v8.5 factory-function sugar — those are web-only.
  • After cordova plugin add / version bump, run cordova prepare ios (and cordova prepare android) to sync native dependencies. iOS additionally requires a fresh pod install inside platforms/ios/.
  • Camera permission: iOS requires NSCameraUsageDescription in the app's Info.plist (or via <config-file> in config.xml); Android's CAMERA permission is declared by the plugin automatically and must be requested at runtime if your minSdkVersion targets API 23+.
  • Scandit.DataCaptureContext.initialize(licenseKey) returns the singleton context; do not construct multiple contexts.

Intent Routing

Based on the user's request, load the appropriate reference file before responding:

Related skills

More from scandit/scandit-sdk-skills

Installs
3
GitHub Stars
10
First Seen
Apr 28, 2026