Question for Apple: When detecting a barcode via AVMetadataObject.ObjectType, is the barcode verified via the check digit in the process?

To elaborate...

If a AVMetadataObject.ObjectType.upce object is detected (aka a UPC-E barcode is scanned with the iPhone camera), and it returns the barcode numbers with this code:

// delegate call
func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) 
{
   let metadataObj = metadataObjects[0] as! AVMetadataMachineReadableCodeObject

   var barcode = metadataObj.stringValue
}

Is the barcode value checked via the UPC-E Check Digit to ensure it actually is a valid UPC-E barcode?

Or is the API simply returning me the numbers detected, and it's up to me to write code to calculate and validate the barcode Check Digit?

In other words... are false scans possible? Or does Apple ensure that if it says it's a UPC-E code (or any other code type), that it is indeed true?

Question for Apple: When detecting a barcode via AVMetadataObject.ObjectType, is the barcode verified via the check digit in the process?
 
 
Q