3

how to get all videos in photos library using PHAsset.

NSArray* selectedMediaTypes = @[@(PHAssetMediaTypeImage)];
    options.predicate = [NSPredicate predicateWithFormat:@"mediaType in %@", selectedMediaTypes];
    options.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]];
    PHFetchResult *assetsFetchResult = [PHAsset fetchAssetsWithOptions:options];

but It misses some videos that lies under this category PHAssetCollectionSubtypeSmartAlbumsynched

So how can I get all my videos in my photos library whether it is slowmo or synched or normal.

Moaz Saeed
  • 1,006
  • 3
  • 10
  • 23

0 Answers0