Apple VisionKit

Paket

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

Fiyat
Free, part of Apple's SDKs
Erişim
None, runs on device

Hakkında

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.

Neler yapabilirsin

  • 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

Başlarken

  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()

Örnek kod

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)

Ayrıntılar

Barındırma
Kendi bilgisayarında
Kullanılabildiği yerler
Tüm dünya
Resmi SDK'lar
Swift
MCP sunucusu
Yok

Görevler

Alternatifler

Aynı görevler için başka araçlar.

Son kontrol: .