title: AVCaptureMetadataOutputObjectsDelegate function not being call
body: <p>i am trying to create a barcode scanner with swift on ios 8 the problem is that i cant get the output of the delegate capture function as mention bellow.</p>
  
  <pre><code>class SecondViewController: UIViewController , AVCaptureMetadataOutputObjectsDelegate {
  
      var captureSession  =   AVCaptureSession()
      var previewLayer    =   AVCaptureVideoPreviewLayer()
      var captureDevice : AVCaptureDevice?
      var metaDataOutput = AVCaptureMetadataOutput()
  
      override func viewDidLoad() {
  
          super.viewDidLoad()
      }
  
      @IBAction func ScanBarcode(sender: UIButton) {
  
         captureSession.sessionPreset = AVCaptureSessionPresetHigh
  
         let devices = AVCaptureDevice.devices()
  
         // device
         for device in devices {
          // Make sure this particular device supports video
          if (device.hasMediaType(AVMediaTypeVideo)) {
              // Finally check the position and confirm we've got the back camera
              if(device.position == AVCaptureDevicePosition.Back) {
                  captureDevice = device as? AVCaptureDevice
              }
          }
        }
  
        if captureDevice != nil {
  
          var err : NSError? = nil
  
          //input
          var input : AVCaptureDeviceInput = AVCaptureDeviceInput(device: captureDevice, error: &amp;err)
  
          if err != nil {
              println(" we have error: \(err?.localizedDescription)")
          }
  
          //preview layer
          previewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
  
          var bounds:CGRect = self.view.layer.bounds
          previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
          previewLayer.bounds = bounds
          previewLayer.position = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds))
  
          cameraView.layer.addSublayer(previewLayer)
  
          //Session
          if captureSession.canAddOutput(metaDataOutput) &amp;&amp; captureSession.canAddInput(input)
          {
              println("adding out put to session ")
               captureSession.addInput(input)
               captureSession.addOutput(metaDataOutput);
          }
  
          //output
          let metadataQueue = dispatch_queue_create("com.1337labz.featurebuild.metadata", nil);
  
          metaDataOutput.setMetadataObjectsDelegate( self, queue: metadataQueue)
      metaDataOutput.metadataObjectTypes = [AVMetadataObjectTypeQRCode,AVMetadataObjectTypeEAN13Code]
  
  
          cameraView.hidden = false
          captureSession.startRunning()
  
          println("array \(metaDataOutput.metadataObjectTypes)")
  
  
        }
        else{
          println("no device found")
        }
    }
  </code></pre>
  
  <p>this function is not called i guess here is where you get the data</p>
  
  <pre><code>func captureOutput(captureOutput: AVCaptureOutput!,didOutputMetadataObjects metadataObjects[AnyObject]!,fromConnection connection:AVCaptureConnection!){
  
        println("processing output")
      }
  </code></pre>
  
  <p>edit : it working i was just trying to scan wrong barcodes</p>