I know there are someone have ask this question.But it is a sorry i donot find the answer.
dispatchQueue = dispatch_queue_create("myQueue", NULL);
[captureMetadaOutput setMetadataObjectsDelegate:self queue:dispatchQueue];
// [captureMetadaOutput setMetadataObjectTypes:[NSArray arrayWithObject:AVMetadataObjectTypeQRCode]];
// 设置条码类型
captureMetadaOutput.metadataObjectTypes = @[AVMetadataObjectTypeQRCode];
i got crashes info from Crashlytics:
[AVCaptureMetadataOutput setMetadataObjectTypes:] - unsupported type found. Use -availableMetadataObjectTypes.
We have to add the output to session first, and then we can set the
metadataObjectTypes
.