Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sagarthecoder opened this issue Sep 8, 2021 · 0 comments
Open

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

sagarthecoder opened this issue Sep 8, 2021 · 0 comments

Comments

@sagarthecoder
Copy link

sagarthecoder commented Sep 8, 2021

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant