Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implements on-device iOS Vision features: OCR, face/barcode detection, segmentation, tracking, document scanning, and Core ML inference.
68% 100%+32 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 15 of 22 without it.
3 of 3 safety checks passed
Not used yet
Complete implementation patterns for DataScannerViewController and VNDocumentCameraViewController covering availability checking, configuration, SwiftUI integration, delegate handling, custom overlays, and camera permissions. All patterns target iOS 26+ with Swift 6.3 unless noted.
Add the camera usage description to Info.plist before using any scanner:
<key>NSCameraUsageDescription</key>
<string>Camera access is needed to scan text and barcodes.</string>
Request permission before presenting the scanner. The canonical order is:
Info.plist usage string, explicit camera access request, isSupported and
isAvailable checks, then present the scanner and call startScanning() after
presentation on the main actor.
import AVFoundation
func requestCameraAccess() async -> Bool {
let status = AVCaptureDevice.authorizationStatus(for: .video)
switch status {
case .authorized:
return true
case .notDetermined:
return await AVCaptureDevice.requestAccess(for: .video)
case .denied, .restricted:
Next to this one in the catalogue, plus more from the same author.