PHLivePhoto request fails to load live-photos with effects (all of them "Loop", "Bounce", etc) from not gallery storage

Originator:Mike.house.nsk
Number:rdar://36977344 Date Originated:January 29 2018, 3:26 PM
Status:closed Resolved:yes
Product:iOS Product Version:11.2.2 (15C202)
Classification: Reproducible:Always
 
PHLivePhoto request fails to load live-photos with effects (not with default("Live")) from external storages as internal iDevice memory (App's Documents for example), remote server and even from App's bundle.

Steps to reproduce:

1. Take a live-phone
2. Apply any effect you'd like to it
3. Export this live-photo to external storage or remote server
4. Try to load transferred file by function

```
func request(withResourceFileURLs fileURLs: [URL], placeholderImage image: UIImage?, targetSize: CGSize, contentMode: PHImageContentMode, resultHandler: @escaping (PHLivePhoto?, [AnyHashable : Any]) -> Swift.Void) -> PHLivePhotoRequestID
```

5. Observe error, you will see

``` 
Error: Invalid video metadata
[AnyHashable("PHLivePhotoInfoErrorKey"): Error Domain=NSCocoaErrorDomain Code=-1 "(null)", AnyHashable("PHLivePhotoInfoCancelledKey"): 0]
```

Note: for the just live-photos it works great.

=============== Answer ==================

PHLivePhoto is meant to represent a photo/video pair. It is displayed in a PHLivePhotoView and can be played by touching it.   A Bounce or Loop is not a Live Photo and is not intended to be displayed as a PHLivePhoto in a PHLivePhotoView. The video should simply be displayed and looped.

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!