Using AVCapturePhotoOutput to capture live photos

Hi,

Can anyone share a code to capture live photos from the iOS camera?

I’m using this:

           captureSession = AVCaptureSession.alloc().init();
           captureSession.setSessionPreset(AVFoundation.AVCaptureSessionPresetPhoto());

           capturePhotoOutput = AVCapturePhotoOutput.alloc().init();

           NSArray<? extends NSNumber> formats = capturePhotoOutput.availableRawPhotoPixelFormatTypes();
           NSNumber availableRawFormat = formats.firstObject();

But availableRawFormat returns null.

thanks

guich

Have you followed all the steps described here?

There is also new ios 9 stuff