Apple VisionKit

Package

Apple framework to scan barcodes, text and documents with the camera on iOS

Price
Free, part of Apple's SDKs
Access
None, runs on device

About

VisionKit ships with Apple's SDKs and runs on the device. DataScannerViewController scans live camera video for QR codes, barcodes and text (iOS 16+, A12 chip or later), and VNDocumentCameraViewController presents a document scanner (iOS 13+). Apple platforms only.

What you can do with it

  • Scan QR codes and barcodes from the live camera in an iPhone or iPad app
  • Present Apple's document camera to scan paper pages into images for a PDF
  • Read text such as URLs or phone numbers from the camera and act on it

Get started

  1. Add a camera usage description to your app's Info.plist
  2. Check DataScannerViewController.isSupported and isAvailable
  3. Present the scanner and call startScanning()

Example

import VisionKit

// Live QR codes and barcodes (iOS 16+)
let scanner = DataScannerViewController(recognizedDataTypes: [.barcode()])
scanner.delegate = self
present(scanner, animated: true) { try? scanner.startScanning() }

// Paper documents, page by page (iOS 13+)
let documentCamera = VNDocumentCameraViewController()
documentCamera.delegate = self
present(documentCamera, animated: true)

Details

Hosting
Runs locally
Available in
Worldwide
Official SDKs
Swift
MCP server
None

Tasks

Alternatives

Other tools for the same tasks.

Last checked on .