I\'m trying to implement a QRCode scanner with the new iOS 7 features but my code isn\'t calling the main AVCaptureMetadataOutputObjectsDelegate
method.
I\'
iOS 10 caused the same problem for me. I currently have the developer edition released at WWDC 2016. When I ran the app on a phone with iOS 9 the captureOutput:didOutputMetadataObjects:
method was called again.
I am trying to figure this out myself. The documentation seems to say that if you don't set the type(s) you want in metadataObjectTypes, you won't get any calls. But my iPad Mini's back camera returns an empty array for availableMetadataObjectTypes. Let us know what you figure out.
Edit:
I just figured out that if you add the AVCaptureMetadataOutput object to the session, the availableMetadataObjectTypes gets filled in and you can add the barcode detector to it. Then the captureOutput delegate will get called, so like this:
AVCaptureMetadataOutput *output = [[AVCaptureMetadataOutput alloc] init];
[output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
[session addOutput:output];
output.metadataObjectTypes = @[AVMetadataObjectTypeQRCode];