This is a sample code to read barcodes with Swift.
Reference:
Swift 4でQRコードを読み取る
AVFoundation(AVCaptureMetadataOutput)でバーコードリーダーを作ってみた
First of all, the info.plist
contains the
Add a key of Privacy - Camera Usage Description
to describe the reason for using the camera.
“Barcode reader reads” and so on.
This phrase appears when you ask for permission to use it.