Post

Replies

Boosts

Views

Activity

Reply to Using DataScannerViewController with async stream
I tried and scanner starts but updateViaAsyncStream() isn't being called: [compiled for iPhone SE] import VisionKit class ViewController: UIViewController, DataScannerViewControllerDelegate {     // omitting other datascanner functions to make code shorter for posting          // Set up Scanner     let viewController = DataScannerViewController(         recognizedDataTypes: [ .text(languages: ["en-US"]) ],         qualityLevel: .balanced,         recognizesMultipleItems: true,         isHighFrameRateTrackingEnabled: true,         isPinchToZoomEnabled: true,         isGuidanceEnabled: false,         isHighlightingEnabled: true)                 var currentItems: [RecognizedItem] = []     func updateViaAsyncStream() async {         print("here")     }          override func viewDidLoad() {         super.viewDidLoad()         viewController.delegate = self     }          override func viewDidAppear(_ animated: Bool) {         present(viewController, animated: true) {             try? self.viewController.startScanning()             NSLog("scanner started")         }     } }
Topic: Machine Learning & AI SubTopic: General Tags:
Jul ’22