Read Barcode on iOS

I've been rummaging aroud trying to figure out best path to reading a barcode on iOS.

I see related code in both Vision and AVFoundation..

Anyone have thoughts on why I would choose one over the other?

Thank-You
Answered by Media Engineer in 615498022
AVFoundation's capture APIs allow one to detect machine readable codes (a variety of 1-D and 2-D codes) from the camera. The API set is easy to configure — it requires no work on the part of the developer to distinguish between detection and tracking of barcodes. You just opt in for the type of codes you'd like to detect. The downside is that the AVCaptureMetadataOutput barcode detection only works on frames streamed in real-time from the camera. It's not a general purpose detector that can be used to find barcodes in a single image or sequence of images stored in a file. Vision's barcode detection is better for the latter purpose.
Accepted Answer
AVFoundation's capture APIs allow one to detect machine readable codes (a variety of 1-D and 2-D codes) from the camera. The API set is easy to configure — it requires no work on the part of the developer to distinguish between detection and tracking of barcodes. You just opt in for the type of codes you'd like to detect. The downside is that the AVCaptureMetadataOutput barcode detection only works on frames streamed in real-time from the camera. It's not a general purpose detector that can be used to find barcodes in a single image or sequence of images stored in a file. Vision's barcode detection is better for the latter purpose.
Helpful and to the point!
Thanks for taking the time to respond
Read Barcode on iOS
 
 
Q