AssetsPickerViewController icon indicating copy to clipboard operation
AssetsPickerViewController copied to clipboard

Couldn't get any LivePhoto or other subMedia types album

Open sagarthecoder opened this issue 4 years ago • 0 comments

I used following code to get all livePhotos only. But it doesn't work and show empty gallery.


var assetsPicker = AssetsPickerViewController()
let config = AssetsPickerConfig()
let options = PHFetchOptions()
options.predicate = NSPredicate(format: "mediaType = %d", PHAssetCollectionSubtype.smartAlbumLivePhotos.rawValue)
 options.sortDescriptors = [NSSortDescriptor(key: "duration", ascending: true)]
        config.assetFetchOptions = [
            .smartAlbum: options,
            .album: options
]

assetsPicker.pickerConfig = config

sagarthecoder avatar Sep 08 '21 12:09 sagarthecoder