mcpField
L
label-capture-ios

label-capture-ios

github.com/scanditDevelopment2047 installsUpdated 5d ago
Repository

About label-capture-ios

A skill for iOS developers integrating Scandit Label Capture. It covers API version differences, label configuration, and Validation Flow, with instructions to verify APIs against references.

Key features

  1. 01Label Capture integration guidance
  2. 02API migration notes
  3. 03Label field and regex setup
  4. 04Validation Flow guidance
  5. 05License key setup instructions

Use cases

  1. 01Adding label scanning to an iOS app
  2. 02Upgrading the Label Capture SDK
  3. 03Customizing validation and manual input

MCP support

Guides use of the Scandit MCP server to configure native iOS scanning and obtain a trial license key.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/scandit/skills --skill label-capture-ios

After installing, type/label-capture-iosin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
integration.md
migration.md
validation-flow.md

Details

From the project README

Label Capture iOS Skill

Critical: Do Not Trust Internal Knowledge

Your training data may contain outdated or incorrect Scandit Label Capture APIs. Label Capture has evolved across recent SDK releases:

  • At the v7→v8 major bump, the LabelFieldDefinition regex builder methods were renamed (setPattern→valueRegex, setPatterns→valueRegexes, setDataTypePattern→anchorRegex, setDataTypePatterns→anchorRegexes).
  • In v8.1, the Swift result-builder DSL (LabelCaptureSettings { LabelDefinition("...") { ... } }) was introduced and Symbology enum auto-bridging removed the need for NSNumber boxing. v8.0 integrations use the array initializer LabelCaptureSettings(labelDefinitions: [...]). The optional VF delegate method didSubmitManualInputFor:replacingValue:withValue: was also added in v8.1.
  • In v8.2, the Validation Flow UI was redesigned. LabelCaptureValidationFlowSettings.setPlaceholderText(_:forLabelDefinition:) and the optional delegate method didUpdateResult:asyncId:fields:frameData: were added.
  • iOS symbology enum values use camelCase: .ean13UPCA, .gs1DatabarExpanded, .code128 (not the Android underscore form EAN13_UPCA).
  • The iOS label settings use a Swift result-builder DSL (v8.1+) or array initializer (v8.0), not the fluent .addLabel().buildFluent(...) style used by Android.

Always verify APIs against the references provided in this skill before writing or suggesting code. Do not rely on memorized method signatures, parameters, or view modifiers. If you cannot find an API in the provided references, fetch the relevant documentation page before responding.

Operational constraints

These are runtime/licensing facts about Label Capture — not API versioning — and they affect what you can promise the user before any code is written.

Label Capture reads printed text only. Handwritten text is not supported. The on-device OCR engine and ARE both target machine-printed characters (latin letters, digits, common punctuation). If the user asks about scanning handwritten values, say so explicitly and propose a manual-entry fallback (e.g. the Validation Flow's manual input field).

ARE (Adaptive Recognition Engine) is Scandit's cloud-based OCR fallback — enabled via .adaptiveRecognition(.auto) on the LabelDefinition. It is a property of the label definition and is overlay-agnostic (it works with the Basic, Advanced, or Validation Flow overlay alike — do not tell the user it is Validation-Flow-only). It is currently in Beta and needs the Adaptive Recognition Engine entitlement, which Scandit enables server-side on your subscription — there is no client-side flag the user toggles themselves; the entitlement rides in the issued license key. Trial keys can be issued for evaluation; production keys require contacting [email protected]. Do not enable it by default. (Distinct from Beta Receipt Scanning, which does require its own dedicated overlay.)

Intent Routing

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

  • Questions about other Scandit products or scanning modes (e.g. SparkScan, Barcode Capture, MatrixScan, ID Capture, or general SDK setup questions not specific to Label Capture) → hand off to the data-capture-sdk skill. Do not attempt to answer questions about other capture modes from memory — the dedicated skill has the correct and up-to-date references.

  • Integrating Label Capture from scratch (e.g. "add Label Capture to my iOS app", "scan a price tag with barcode and expiry date", "scan a price/shelf label", "read a VIN", "read a seven-segment display / digital scale", "how do I use Smart Label Capture", "I want to build a label scanning app", "which overlay should I use", "what is ARE", "scan a whole receipt", "how do I improve OCR accuracy", "how do I capture the scanned image with the Basic Overlay", "build a fully custom AR overlay / floating pins / draw my own views on the camera feed", "use the Advanced Overlay", "anchor / position / offset a custom view on a tracked label", "stop the repeated capture beep / emit feedback once per label", "scan a barcode AND a label / use Barcode Capture and Label Capture together / why does adding a second mode stop scanning", "which SPM products / why does my IMEI or serial-number label crash at launch") → read references/integration.md and follow the instructions there. It contains the pre-built whole-label factory definitions (price capture, VIN, seven-segment) and the Beta Receipt Scanning path — consult it before composing custom fields. If the user has no existing project, the guide will direct you to offer the pre-built sample first.

  • Enabling or customising the Validation Flow (e.g. "how do I enable the Validation Flow", "add the validation flow overlay", "customise the placeholder text / button labels in the validation flow", "how do I handle the result from the validation flow", "why is the Validation Flow not configurable", "what can I change in the VF", "how do I capture the frame image during the Validation Flow", "can I embed the Validation Flow in a card or sheet") → read references/validation-flow.md and follow the instructions there. Also read references/integration.md first if the user does not yet have a baseline Label Capture integration in place — the Validation Flow is a swap-in for the Basic Overlay, not a from-scratch flow.

  • Migrating or upgrading an existing Label Capture integration (e.g. "upgrade my Label Capture to the latest SDK", "migrate from v7 to v8", "what changed between SDK versions for Label Capture") → read references/migration.md and follow the instructions there.

API Usage Policy

Only use APIs that are explicitly documented in the Scandit references below. Do not invent or guess method signatures, parameters, or view modifiers. If unsure whether an API exists or how it is called — or if a compile error occurs — fetch the relevant reference page before responding. Do not tell the user to check the docs themselves. After answering, always include the relevant link so the user can explore further.

Never construct or guess documentation URLs. When you need a specific class or property's API page:

  1. First check whether the page you already fetched (e.g. the Advanced Configurations page) contains a direct hyperlink to it — topic pages link directly to relevant API symbols. Always request links alongside content in your fetch prompt.
  2. If no direct link was found, fetch the API index (see Full API reference in the table below), extract the actual link from it, and follow that.

URL structures can vary (e.g. api/ui/ subdirectory) and guessing will lead to 404s.

Licence key

Scanning needs a Scandit licence key. For this skill the licence product is native and the licence platform is ios.

Work through these in order — never block the user on MCP:

  1. The Scandit MCP server is connected — call ensure_scanner_setup with product native and platforms ios, app_identifier (the app's bundle or application id; for web, its production domain, never localhost) and env_var SCANDIT_LICENSE_KEY. Do not run the command it returns. Then call get_license_key with the key's id, from that result or from list_license_keys; if list_license_keys shows the key is not a trial, ask the user before fetching it. Show at most a masked preview in chat; never print a full key.

  2. It is not connected — tell the user once that they can connect the remote Scandit MCP server, https://ssl.scandit.com/mcp, in their MCP client, then continue from step 1. Do not edit MCP client configuration yourself.

    Authentication is browser-based, so it is not supported headless or in CI. The server provisions trial keys only; it never creates, revokes, or modifies production licences.

  3. The user declines, or has no MCP client — they generate a key themselves at https://ssl.scandit.com (no account yet: https://ssl.scandit.com/dashboard/sign-up?p=test) and paste it in.

Then put the key into the code: write it into the licence-key call in place of the placeholder — the key get_license_key returned, or the one the user pastes or gives you — still showing only a masked preview in chat. Do not search the project, its files or the environment for a key.

References

Direct users to the right resource based on their question:

TopicResource
Basic integrationGet Started · Sample (LabelCaptureSimpleSample)
Label Definitions (fields, regex, presets)Label Definitions
Advanced topics (Validation Flow customization, adaptive recognition, custom overlays)Advanced Configurations
Full API referenceLabel Capture API

Comments

Markdown supported