I\'m trying to grab a thumbnail of the last photo taken on a device using the new Photos framework in iOS 8. The code I have right now to do this is the following:
PHFetchResult *fetchResults = [PHAsset fetchAssetsWithOptions:options];
NSArray* tempArray = [fetchResults objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, fetchResults.count)]];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"description contains %@",@"assetSource=3"];
NSArray *filteredArray = [tempArray filteredArrayUsingPredicate:predicate];
The filteredArray doesn't include the "Recently Deleted" album and doesn't have identical looking photos. Also for the deleted photo asset in your assetsInfo, the following two will return NO.
[asset canPerformEditOperation:PHAssetEditOperationContent]
[asset canPerformEditOperation:PHAssetEditOperationProperties]
In PHAsset Runtime Headers there are useful properties:
@property (getter=isTrashed, nonatomic, readonly) bool trashed;
@property (nonatomic, readonly) NSDate *trashedDate;