In iOS 8, I want to get all the pictures stored on the device. My problem is that I receive them, but some of them are present more than once. PHAsset properties (hidden, mediaSubtypes, etc.) are the same for all images, so I cannot, for example, exclude subtypes of PHAssetMediaSubtypePhotoHDR . The only way I found is not to add multiple photos with the same date, but this is a problem when multiple photos were saved with the same creation date.
Does anyone know why I get these duplicates and what can I do to avoid them?
This is how I get the photos:
PHFetchOptions *fetchOptions = [PHFetchOptions new]; fetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:YES],]; PHFetchResult *phAssets = [PHAsset fetchAssetsWithMediaType:PHAssetMediaTypeImage options:fetchOptions];
ios objective-c ios8 photos
olivier Sep 17 '14 at 5:36 on 2014-09-17 05:36
source share