title: AVCapturePhotoSettings error in ios 10?
body: <p>My application have use camera then compress image JPEG, with ios version &lt; 10 , I have use AVCaptureStillImageOutput but ios version >= 10 I use AVCapturePhotoOutput error.I have setting code:`</p>
  
  <pre><code>self.photoOutput = [[AVCapturePhotoOutput alloc] init];
          AVCapturePhotoSettings *photoSettings =
              [AVCapturePhotoSettings photoSettingsWithFormat:@{AVVideoCodecKey : AVVideoCodecJPEG}];
  
      [self.photoOutput capturePhotoWithSettings:photoSettings delegate:self];
      [self.session addOutput:self.photoOutput];`
  </code></pre>
  
  <p>I have problems when run app, app crash with error: </p>
  
  <pre><code>[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection
  </code></pre>
  
  <p>Does anybody know how to use this? Thanks. </p>