I can\'t find any API to capture live photos. Did I miss something?
Apple release DOCs
Live Photos
Live Photos is a n
As per Apple Doc:
UIImagePickerControllerLivePhoto
The Live Photo representation of the selected or captured photo.
A Live Photo is a picture, that includes motion and sound from the moments just before and after its capture. On compatible devices, the Camera app captures all photos as Live Photos by default, but the imagePickerController:didFinishPickingImage:editingInfo: method’s image parameter contains only the still image representation.
To obtain the motion and sound content of a live photo for display (using the PHLivePhotoView class), include the kUTTypeImage and kUTTypeLivePhoto identifiers in the allowed media types when configuring an image picker controller. When the user picks or captures a Live Photo, the editingInfo dictionary contains the UIImagePickerControllerLivePhoto key, with a PHLivePhoto representation of the photo as the corresponding value.
Available in iOS 9.1 and later.
// create an image picker controller instance
UIImagePickerController *picker = [[UIImagePickerController alloc]init];
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
picker.allowsEditing = NO;
picker.delegate = self;
// make sure we include Live Photos (otherwise we'll only get UIImages)
NSArray *mediaTypes = @[(NSString *)kUTTypeImage, (NSString *)kUTTypeLivePhoto];
picker.mediaTypes = mediaTypes;
// bring up the picker
[self presentViewController:picker animated:YES completion:nil];
And then
# pragma mark - UIImagePickerController Delegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
// check if this is a Live Image, otherwise present a warning
PHLivePhoto *photo = [info objectForKey:UIImagePickerControllerLivePhoto];
if (!photo) {
[self notLivePhotoWarning];
return;
}
// create a Live Photo View
PHLivePhotoView *photoView = [[PHLivePhotoView alloc]initWithFrame:rect];
photoView.livePhoto = [info objectForKey:UIImagePickerControllerLivePhoto];
}