Skip to content

Couldn't get any LivePhoto or other subMedia types album #104

@sagarthecoder

Description

@sagarthecoder

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions