Reputation: 2700
This works with standard QR Codes, but however not with a Data Matrix like here.
Upvotes: 1
Views: 2233
Reputation: 339
The reason for this is, that your example doesn't scan for Data Matrix. It only scans for AVMetadataObjectTypeQRCode
, AVMetadataObjectTypeEAN8Code
, AVMetadataObjectTypeEAN13Code
and AVMetadataObjectTypePDF417Code
. It should work, if you add AVMetadataObjectTypeDataMatrixCode
to the metadataOutput.metadataObjectTypes
-array.
Here you find a list of the machine readable object types you can scan for with AVFoudation.
Upvotes: 4