title: Camera takes dark image with iPhone
body: <p>I am working on a media app and for capturing images. I am using AVcapture. Everything is working fine but I am facing an issue : when I am taking 5 images in a row using the camera, the first picture usually comes darker than the others.</p>
  
  <p>My code for capture is as below:</p>
  
  <pre><code>   [device lockForConfiguration:nil];
      AVCaptureSession *session = [[AVCaptureSession alloc] init];
      session.sessionPreset = AVCaptureSessionPresetMedium;
      [session beginConfiguration];
      // Create device input and add to current session
      AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error: nil];
      [session addInput:input];
  
      // Create video output and add to current session
      AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
      [session addOutput:output];
  </code></pre>
  
  <p>Does anyone know where does my issue come from?</p>