Constants for the AVCaptureMetadataOutput metadataObjectTypes property?

When using AVFoundation to detect functions (such as faces or barcodes) in an image, you must call a line, for example:

AVCaptureMetadataOutput *metadataOutput = ...;
metadataOutput.metadataObjectTypes = metadataOutput.availableMetadataObjectTypes;

Examining the available MetadataObjectTypes shows the following lines:

face,
"org.gs1.UPC-E",
"org.iso.Code39",
"org.iso.Code39Mod43",
"org.gs1.EAN-13",
"org.gs1.EAN-8",
"com.intermec.Code93",
"org.iso.Code128",
"org.iso.PDF417",
"org.iso.QRCode",
"org.iso.Aztec"

If I am writing a barcode scanning application, I do not want the framework to search for faces, so instead of transmitting, metadataOutput.availableMetadataObjectTypesI want to transfer specific barcodes for search. Instead of using these hard-coded strings, I was hoping they would be defined as constants somewhere.

Do they exist anywhere in the framework, or should I use string strings?

+1
source share
1

-, AVMetadataMachineReadableCodeObject ( ).

, - :

metadataOutput.metadataObjectType = @[AVMetadataObjectTypeQRCode, AVMetadataObjectTypeEAN13Code];
+4

Source: https://habr.com/ru/post/1013931/


All Articles