Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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