PHImageManager requestLivePhotoForAsset with PHImageRequestOptionsVersionOriginal returns the edited version

Originator:flojsynchro
Number:rdar://36346139 Date Originated:1/8/2018
Status:open Resolved:
Product:iOS SDK / Photos Framework Product Version:11.2.1
Classification:Bug Reproducible:Always
 
I am trying to retrieve the original version of an edited live photo from the Photo LIbrary.
To do so, I am calling the code below.
I tried different combination of targetSize / contentMode / deliveryMode and PHLivePhotoRequestOptions.version but nothing change: PHImageManager always returns the edited version.

For the same photo, calling PHImageManager.requestImageForAsset with PHImageRequestOptions.version set to PHImageRequestOptionsVersionUnadjusted or PHImageRequestOptionsVersionOriginal returns the original version.

The project attached is a simple app that will display the last edited live photos taken on a device by taping on the button 'loadImages'.

```
- (PHLivePhotoRequestID)retrieveLivePhotoFromAsset:(PHAsset *)asset  
                                 completionHandler:(void (^)(PHLivePhoto * _Nullable livePhoto))completionHandler {  
    PHImageManager *imageManager = [PHImageManager defaultManager];  
    PHLivePhotoRequestOptions *livePhotoRequestOption = [[PHLivePhotoRequestOptions alloc] init];  
    livePhotoRequestOption.deliveryMode = PHImageRequestOptionsDeliveryModeOpportunistic;  
    livePhotoRequestOption.networkAccessAllowed = NO;  
    if (asset.sncr_edited == YES) {  
        livePhotoRequestOption.version = PHImageRequestOptionsVersionOriginal;  
    }  
    
    return [imageManager requestLivePhotoForAsset:asset  
                                       targetSize:PHImageManagerMaximumSize  
                                      contentMode:PHImageContentModeDefault  
                                          options:livePhotoRequestOption  
                                    resultHandler:^(PHLivePhoto * _Nullable livePhoto, NSDictionary * _Nullable statusInformation) {  
                                        completionHandler(livePhoto);  
    }];  
}  
```

Steps to Reproduce:
- take a picture with 'Live Photo' turned ON,
- edit that picture in the Photo Application
- in the code, call "requestLivePhotoForAsset" with livePhotoRequestOption.version = PHImageRequestOptionsVersionOriginal; 
- display the asset retrieved on screen

Expected Results:
The original version of the live photo is displayed

Actual Results:
The edited version of the live photo is displayed

Version/Build:
iOS 11.2.1 (15C153)

Configuration:
iPhone 7+

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!