title: iOS7 AVCapture captureOutput never gets called
body: <p>Please understand that I cannot upload the whole code here.</p>
  
  <p>I have</p>
  
  <pre><code>@interface BcsProcessor : NSObject &lt;AVCaptureMetadataOutputObjectsDelegate&gt; {}
  </code></pre>
  
  <p>and BcsProcessor has <code>setupCaptureSession</code> and <code>captureOutput</code> method.</p>
  
  <pre><code>- (void)captureOutput:(AVCaptureOutput*)captureOutput didOutputMetadataObjects:(NSArray*)metadataObjects fromConnection:(AVCaptureConnection*)connection
  
  
  - (NSString*)setUpCaptureSession {
      NSError* error = nil;
  
      AVCaptureSession* captureSession = [[[AVCaptureSession alloc] init] autorelease];
      self.captureSession = captureSession;
  
         AVCaptureDevice* __block device = nil;
      if (self.isFrontCamera) {
  
          NSArray* devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
          [devices enumerateObjectsUsingBlock:^(AVCaptureDevice *obj, NSUInteger idx, BOOL *stop) {
              if (obj.position == AVCaptureDevicePositionFront) {
                  device = obj;
              }
          }];
      } else {
          device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
      }
  
      AVCaptureDeviceInput* input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&amp;error];
  
      AVCaptureMetadataOutput* output = [[[AVCaptureMetadataOutput alloc] init] autorelease];
      output.metadataObjectTypes = output.availableMetadataObjectTypes
  
      dispatch_queue_t outputQueue = dispatch_queue_create("com.1337labz.featurebuild.metadata", 0);
      [output setMetadataObjectsDelegate:self queue:outputQueue];
  
      captureSession.sessionPreset = AVCaptureSessionPresetPhoto;
  
      if ([captureSession canAddInput:input]) {
          [captureSession addInput:input];
      }
  
      if ([captureSession canAddOutput:output]) {
          [captureSession addOutput:output];
      }
  
      // setup capture preview layer
      self.previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:captureSession];
  
      // run on next event loop pass [captureSession startRunning]
      [captureSession performSelector:@selector(startRunning) withObject:nil afterDelay:0];
  
      return nil;
  }
  </code></pre>
  
  <p>So the code above sets up the session and add <code>AVCaptureMetadataOutput</code>. and <code>BcsProcessor</code> is supposed to receive the captured metadata. but my captureOutput method does not receive any data, or gets called. </p>
  
  <p>I'll appreciate any help or comments.</p>