Hello everyone, first let me say a few words about myself. I am an IT student and I want to learn and develop some applications in Swift. Now I am working on one application and I need a barcode scanner to complete it. So I need help from someone who can help me with a simple barcode scanner. My idea is that the barcode will be on one screen and they have to read the code and write it to a variable. That's my idea. I will appreciate the full code or help. thank you for answer
Accepted Reply
The Vision framework can detect various types of barcodes (start here: https://developer.apple.com/documentation/vision/vndetectbarcodesrequest)
If you need to create bar codes to work with, you can use a built-in CoreImage filter to generate a bar code. See https://developer.apple.com/documentation/coreimage/cibarcodedescriptor.
The links above should give you a starting point, and some keywords to search with.
-
Thank you so much.
Replies
The Vision framework can detect various types of barcodes (start here: https://developer.apple.com/documentation/vision/vndetectbarcodesrequest)
If you need to create bar codes to work with, you can use a built-in CoreImage filter to generate a bar code. See https://developer.apple.com/documentation/coreimage/cibarcodedescriptor.
The links above should give you a starting point, and some keywords to search with.
-
Thank you so much.
The DataScannerViewController is available to easily handle this exact scenario.
Here's the docs. https://developer.apple.com/documentation/visionkit/scanning_data_with_the_camera
And here's the WWDC video. https://developer.apple.com/videos/play/wwdc2022/10025/
-
Thank you so much.