What is your recommendation for using DataScannerViewController to detect money/currency values? DataScannerViewController.TextContentType does not appear to support money, currencies, or generic numbers (see FB10139138). The iOS Camera app supports money/currency detection in iOS 16. What is the best practice for me to implement a similar feature in my app? Should I recognize all text and then parse each recognized text item myself to determine if the string value contains number or currency amount?

Ah, good enhancement request. Currently we're not supporting currency.

You might be able to detect the presence of currency with UIDataDetectors, but you won't be able to highlight them.

Another option is to use capturePhoto() to take a still then use the Live Text APIs. That'll highlight all the data detector elements, not just money.

You could also add some business logic on top of Vision text recognition to dial in on numbers only, specific (relative) text size or even position of the text in the rectangle of the currency.

Tagged with: