twostraws / CodeScanner

A SwiftUI view that is able to scan barcodes, QR codes, and more, and send back what was found.
MIT License
986 stars 272 forks source link

Ability to continuously scan by ignoring specific codes #130

Closed qalandarov closed 4 months ago

qalandarov commented 4 months ago

Problem statement: When scanning the same barcode again (either right away or after scanning another product) - could be done by continuous option, but the handler would be called each time which could be undesirable (for example, presenting a sheet when a code is detected). Using oncePerCode kind of does the trick, but scanning the same code again doesn't work as the name suggests.

Solution: Ability to recognize any barcode except the specific "ignored" list which could let us put the current barcode into the ignored list and once another code is detected we update the list (like a "dynamic oncePerCode")

qalandarov commented 4 months ago

Another one please @nathanfallet (there's one more 🙏)