PHFetchOptions with Live Photo mediaSubtype NSPredicate query does not include edited Live Photos

Originator:ayn
Number:rdar://34115541 Date Originated:08/28/17
Status:Resolved Resolved:
Product:iOS + SDK Product Version:
Classification: Reproducible:Always
 
Normally this is how we query PhotoKit for Live Photos:

  func loadFetchResults() {
    let result = PHAssetCollection.fetchAssetCollections(with: .smartAlbum, subtype: .smartAlbumUserLibrary, options: nil)
    guard let album = result.firstObject else { return }

    let options = PHFetchOptions()
    options.predicate = NSPredicate(format: "(mediaSubtype & %d) != 0", PHAssetMediaSubtype.photoLive.rawValue)
    options.sortDescriptors = [NSSortDescriptor(key: "creationDate", ascending: false)]

    self.fetchResult = PHAsset.fetchAssets(in: album, options: options)
  }

In iOS 10 and above, we have the ability to edit Live Photos. However, photos edited either with the built in iOS Photos.app, or with 3rd party apps that edit live photos, do not show up in the media subtype query.

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!