How to Add an iOS Barcode Scanner SDK

Published

Last updated

Categories Developers

In short:

  • In 2026, the easiest way to build an iOS barcode scanner is to combine an AI coding agent with barcode scanning Agent Skills.
  • Barcode scanning Agent Skills created by a recognized barcode scanning vendor help you autonomously integrate production-ready barcode scanning into your app.
  • Barcode scanning Agent Skills eliminate the need to hunt through documentation to identify the right product or go through multiple fix-and-try loops.
  • If you’re not using an AI coding assistant, adding an iOS barcode scanner requires manually choosing the right SDK, adding the supported symbologies for your use case, configuring the appropriate scanning features, customizing the user interface, and adding error handlers.

In 2026, the easiest way to build an iOS barcode scanner with optimal performance and minimal effort is to use an AI coding assistant with barcode scanning Agent Skills published by a recognized vendor of barcode scanner SDKs. Through a few prompts, you get the optimal solution for your use case without needing a lengthy evaluation or customization.

This blog explains how to add barcode scanning to an iOS app using your AI coding assistant and Scandit Agent Skills. We’ve also included instructions for manually integrating barcode scanning and a comparison between Scandit and other popular iOS barcode scanning libraries.

How do I use AI to add a barcode scanner for iOS?

To use AI to add a barcode scanner to an iOS app, combine barcode scanning Agent Skills with an AI coding assistant. Once the code is added, test your new features and performance under real-world conditions.

A word of warning: AI coding tools cannot give you the optimal barcode scanner code without domain-specific Agent Skills. Without purpose-built understanding, your tool is more likely to generate a subpar user experience, unoptimized features, and broken or outdated functionality.

Your barcode scanner must blend seamlessly into your app, acting as an indispensable part of the user experience rather than a cumbersome addition. It also needs to work within the constraints of your users' physical world, whether it’s the chaotic velocity of a busy retail environment or the varied and awkward environments of warehouse operations.

Scandit Agent Skills bring 15 years of barcode, label, and ID scanning expertise directly into any AI coding agent — grounded in our knowledge of how Scandit APIs are deployed across thousands of customer integrations. Based on the Agent Skills Open Standard, they autonomously select the appropriate product and framework, customize workflows and UI, and generate production-ready integration code.

Here’s how you can use your AI coding assistant and Scandit’s Agent Skills to add production-ready barcode scanning code (using Objective-C, UIKit, or SwiftUI) to your iOS app.

1. Add production-ready barcode scanning code to your project

  1. Install Scandit Agent Skills into your AI coding tool.

Claude Code

Run these commands:

/plugin marketplace add scandit/skills
/plugin install scandit-sdk@scandit-plugins

Codex/ChatGPT app

Click here to install Scandit Agent Skills.

Codex CLI

Run these commands:

codex plugin marketplace add scandit/skills
codex plugin add scandit-sdk@scandit-plugins

Cursor

Click here to install Scandit Agent Skills.

GitHub Copilot

Run these commands:

copilot plugin marketplace add scandit/skills
copilot plugin install scandit-sdk@scandit-plugins

Any other AI coding agent

Run this command:

npx plugins add scandit/skills

2. In your AI coding agent, describe your use case in plain language, providing as much detail as possible. Add photos for more context, such as pictures of the barcodes on the items you want to scan. The Agent Skill will ask for more information and a Scandit license key, if necessary.

Here is an example prompt to add barcode scanning to an existing iOS inventory app:

In this app, users currently add items to the inventory by typing in barcodes manually. Add camera-based barcode scanning to this flow.

- Use /sparkscan-ios, with the floating scan button.

- A scan looks up the item in the existing inventory and adds it to the list, exactly like a manual entry does. If the barcode isn't found, prompt to add it.

- Keep manual entry as is. Scanning is an additional input.

- Enable EAN-13, UPC-A, Code 128, and QR.

- Match the scanning UI to the app's design system.

This example uses the sparkscan-ios skill, as it’s the fastest way to get a reliable barcode scanning experience, including all of Scandit’s AI barcode scanning features.

3. If you didn’t invoke a specific skill, the data-capture-sdk product-picker skill recommends the appropriate Scandit product and framework combination (e.g., SparkScan, BarcodeCapture, MatrixScan AR, MatrixScan Count, Smart Label Capture, etc.).

4. The matching product-and-framework skill (e.g., sparkscan-ios) autonomously integrates the appropriate code into your iOS project.

5. If needed, you can run prompts to customize workflows, the user interface, data manipulation, and error handling, and to integrate with backend systems.

6. As always, you should review the generated code and test against production workflows. If changes are required, use your AI coding tool and Scandit Agent Skills to automatically update the code.

2. Test barcode scanning performance in iOS

The best way to test barcode scanning performance is to run your barcode scanner under real-world conditions.

Whether you use Scandit or another iOS barcode scanning library, here are several ways to test the performance of barcode scanning:

  • Ensure there is clear guidance, feedback, and helpful hints to create smooth scanning workflows for users rather than confused, error-prone tasks.
  • Try different barcode symbologies, label sizes, print quality, and backgrounds.
  • Scan barcodes in different orientations, such as upside down and sideways, and flip the phone upside down to see how the scanner performs.
  • Test barcode scanning with labels experiencing reflections and glare.
  • Scan barcodes at a distance, and test whether users can zoom in if needed.

For more background and example test cases, read this developer guide on how to measure barcode scanning performance. You can use our barcodes sample sheet for quick evaluation

PDF417 with DataMatrix with SparkScan

Start barcode scanning on native iOS

Add production-ready barcode scanning fast with Scandit Agent Skills

How do I build an iOS barcode scanner manually?

To build an iOS barcode scanner manually, first choose the appropriate SDK, then configure barcode symbology support, customize the UI, and test scanning under real-world conditions.

The best option for balancing customization and development velocity is to use a pre-built barcode scanning component such as Scandit SparkScan. These components solve many feature and integration challenges for you, reducing timelines and frustration.

Integrating SparkScan into your iOS app gives you:

  • AI-powered scanning that reduces unwanted scans by up to 100% and has a 0% false positive rate for all major barcodes.
  • High-speed scanning for any environment, including data-dense codes and tiny, torn, damaged, curved, and shiny barcodes.
  • Rapid decoding of barcodes even at long range, in low light, or at extreme angles.
  • UI elements to streamline scanning tasks, including a shutter button and camera preview that floats on top of any iOS app.
  • Customizable colors, sizes, and positions of UI elements to fit your app’s existing UI and branding.

SparkScan’s trigger button is designed not to obscure your app’s existing UI, with a semi-transparent background and the ability for users to drag to their preferred position. When not in use, the trigger button collapses, and the camera preview disappears to free up screen real estate.

Whether you’re using UIKit or SwiftUI, the fastest way to see if SparkScan is suitable for your needs is to follow the manual instructions below for building our iOS List Building sample. This sample provides a dummy app to scan into, along with a scanning interface.

You can deploy SparkScan using the Scandit Agent Skills instructions above. Otherwise, follow the manual steps below.

The prerequisites are:

Close up damaged label with SparkScan boxes on shelves

Testing the Scandit iOS SDK is easy

Integrate with just a few lines of code or use our samples

1. Add the Scandit Data Capture SDK license key to your project

To run the application, you must add the Scandit Data Capture SDK license key to the project.

Replace the Scandit license key where you see '-- ENTER YOUR SCANDIT LICENSE KEY HERE --' in the sample app.

  • UIKit: /Controllers/ViewController.swift
  • Swift: /SparkScanViewController.swift

2. Run the sample app

To test that your license key works and the app runs, build and deploy the application on your iOS device or iOS Simulator.

Once running, follow these steps to capture barcodes using your device’s camera:
User interfaces for SparkScan ListBuildingSample for JavaScript showing scanning and results screens with guidance about how to us
3. Change supported symbologies

The symbologies your app supports are configured through SparkScanSettings. The sample app is already configured to support multiple 1D symbologies, such as EAN-8, UPC-E, Code 128, and Interleaved 2 of 5 (ITF).

To change this to the symbologies for your use case:

  1. Open /Controllers/ViewController.swift (or SparkScanViewController.swift for SwiftUI) and navigate to the Set<Symbology>() call.
  2. Modify the call as follows:
Set<Symbology>([.ean8, .ean13UPCA, .upce, .code39, .code128, .interleavedTwoOfFive, .qr]).forEach {
    settings.set(symbology: $0, enabled: true)
}

Here, we’ve added support for QR codes.

4. Customize the user interface

Using advanced configurations, you can customize other aspects of the SparkScan UI to suit your needs and use cases. This includes item colors (i.e., icons, buttons, toolbar), trigger button icon, preview window size, and more.

The graphic below shows three different examples of how colors, positions, and sizes can be customized to fit different iOS apps. If you’re using Scandit Agent Skills, customization can be done using prompts (e.g., for the first example below, something like, “use a fixed trigger button, round and placed bottom right of the screen, in the Scandit teal”).

How Scandit supports iOS barcode scanning

Scandit transforms iOS barcode scanning into an AI-powered capture engine that adapts to any workflow and edge case. Proven across hundreds of billions of scans on many types of devices, Scandit software scans the right code every time, regardless of label or environmental condition.

Scandit’s performance

Here’s what you get with the Scandit iOS Barcode Scanner SDK:

  • Accuracy >99% for common barcode symbologies.
  • Decode speeds of 480 scans per minute, faster than human perception.
  • Zero false positives for all major barcode symbologies.
  • Reliable barcode scanning under less-than-ideal conditions: tiny, torn, damaged, curved, or shiny barcodes, long scan ranges, low light, and extreme angles.
  • Successful captures with camera resolutions as low as 240x320 pixels and barcode resolutions as low as 0.5 pixels per thin barcode element.

The Scandit Vision AI Engine is the intelligence behind the Scandit Smart Data Capture Platform, which powers our barcode, ID, and label scanning, as well as ShelfView products. Additionally, the Scandit iOS Barcode Scanner SDK is built on a C/C++ foundation, ensuring core features load efficiently in the background and consume minimal system resources.

Framework support

The Scandit iOS Barcode Scanner SDK supports Expo and other popular development frameworks. Barcode scanning libraries are also available for Native Android, JavaScript, Xamarin, React Native, Flutter, .NET (iOS/Android and MAUI), Cordova, Capacitor, and Titanium.

Scandit’s security model

Scandit takes a security by design approach to all software, where you have complete control over data collection and processing. This means:

  • All image processing happens on the device to ensure scanning confidentiality and high availability.
  • Any data you choose to share with Scandit is encrypted during transit and at rest.
  • Scandit is ISO 27001:2022 Certified and compliant with applicable privacy regulations, including GDPR and CCPA.

For a complete evaluation kit, read our guide to choosing the best barcode scanner SDK for your app.

How does Scandit compare with ML Kit and ZXing for iOS barcode scanning?

Here’s a table showing how we believe Scandit compares with the free ML Kit and ZXing barcode scanning libraries in the context of iOS. The versions compared are current as of July 2026, with ZXing in maintenance mode since 2019.

In summary, choose Scandit for production iOS workflows that need native iOS support, zero false positives, pre-built workflows, advanced AI scanning features, and enterprise-grade support SLAs. Use ML Kit when you need Google’s machine vision APIs and can build the iOS bridge yourself. Use ZXing only when its maintenance status and features fit your risk profile.

Product features

Category

Scandit

ML Kit

ZXing

Native support for iOS

✓ Yes

✕ No

Provided through CocoaPods

✕ No

Third-party wrappers available

Supported symbologies

1D formats:

Codabar, Code 11, Code 25, Code 32, Code 39, Code 93, Code 128, EAN-2, EAN-5, EAN-8, EAN-13, GS1 DataBar, IATA 2 of 5, ITF, JAN, Matrix 2 of 5, MSI Plessey, UPC-A, UPC-E

2D formats:

ArUco, Aztec, Data Matrix, Data Matrix Direct Part Marking (DPM), Data Matrix Rectangular Extension, DotCode, Micro PDF417, MaxiCode, Micro QR Code, PDF417, QR Code, Rectangular Micro QR Code

GS1 Composite Codes (A, B, C)

Postal codes:

Australia Post, French Postal Code (La Poste), KIX (Klant index), Posi LAPA 4 State Code, Royal Mail 4 State Customer Code (RM4SCC), Swiss Post, UPU (Universal PRM4SCC Barcode Symbology | Scanditostal Union) S18 4-State Code , USPS Intelligent Mail

Additional formats:

GS1 Data Carrier, 3D barcodes

1D formats:

Codabar, Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E

2D formats:

Aztec, Data Matrix, PDF417, QR Code

1D formats:

Codabar, Code 39, Code 93, Code 128, EAN-8, EAN-13, ITF, UPC-A, UPC-E, UPC/EAN Extension 2/5

2D formats:

Aztec, Data Matrix, MaxiCode, PDF417, QR Code, RSS-14, RSS-Expanded

Automatic symbology detection

✓ Yes

✓ Yes

✓ Yes

Multiple barcode scanning

✓ Yes**

✓ Yes

✕ No*

Works with any orientation

✓ Yes

✓ Yes

✕ No

Gesture support

✓ Yes

✓ Yes

✕ No

Augmented reality assistance

✓ Yes

✕ No

Not natively (can be added with ARCore)

✕ No

Simultaneous barcode and text scanning data capture

✓ Yes

✕ No

✕ No

Low-level machine vision APIs

✕ No

✓ Yes

✕ No

Improved image capture using AI

✓ Yes

✕ No

Not natively (can be added with other Google APIs)

✕ No

Context-based scanning using AI

✓ Yes

✕ No

✕ No

Turnkey app

✓ Yes

Scandit Express

✕ No

✕ No

Includes barcode scanning Agent Skills

✓ Yes

(Scandit Agent Skills)

✕ No

✕ No

Native support for Expo

✓ Yes

✕ No

✕ No

User interface/pre-built components

✓ Yes

Si

✕ No

Enterprise support and SLAs

✓ Yes

Full lifecycle support from trial to production; 24/7 support available

✓ Yes

Available through Google Cloud Customer Care

✕ No

*According to the ZXing documentation, it detects multiple barcodes by repeatedly decoding portions of the image. After one barcode is found, the areas left, above, right, and below it are scanned recursively.

**The Scandit SDK detects multiple barcodes in full-frame images in real-time, and tracks their positions as they move in and out of frame.

Security and compliance

Security category

Scandit

ML Kit

ZXing

On-device processing

✓ Yes

✓ Yes

✓ Yes

Scans offline

✓ Yes

✓ Yes

✓ Yes

Data encryption (in-transit and at-rest)

✓ Yes

✓ Yes

✕ No

Usage tracking

✓ Yes

Customers can choose whether metadata is transferred to external servers or not. Data is only transmitted for debugging, statistical analysis, performance monitoring, improvements and/or license compliance purposes.

✓ Yes

Data collected is listed here.

✕ No

CCPA

✓ Yes

✓ Yes

Via Google Cloud

✕ No

GDPR

✓ Yes

✓ Yes

Via Google Cloud

✕ No

ISO 27001

✓ Yes

✓ Yes

Via Google Cloud

✕ No

These results are based on side-by-side feature comparisons in April 2025 (ML Kit) and December 2025 (ZXing). For a deeper comparison between Scandit and these libraries, including performance testing results, read our ML Kit Barcode Scanner vs. Scandit and ZXing Barcode Scanner vs. Scandit blogs.

Get an iOS barcode scanner that knows how you work

When you prioritize UX by integrating an iOS barcode scanner that simplifies usage, minimizes errors, and scales to growing business demands, you pave the way for increased adoption and productivity. An SDK that includes AI and other assistive features ensures rapid deployment, and the right barcode is scanned every time, leading to greater adoption and productivity.

The iOS and open-source solutions didn’t work that well, especially in difficult and low lighting or with damaged codes. The Scandit context-aware AI engine helps eliminate unintentional scans, a result of the environments Yuka users usually scan products in, such as the store, pantry, or fridge, where barcodes are heavily prevalent.

François Martin, CTO and co-founder, Yuka

Next: Dive deeper into how to make a barcode scanning app performant →

Frequently asked questions

Loading search...

Please wait a moment