Get an error when trying to get all the photos from PHAssetCollection.fetchAssetCollections

Based on the comments, I’m not entirely sure what the issue is but I hope this code could provide some assistance. Using .album rather than .smartAlbum could also be part of the issue. private var fetchResult: PHFetchResult<PHAsset>! func fetchOptions(_ predicate: NSPredicate?) -> PHFetchOptions { let options = PHFetchOptions() options.sortDescriptors = [ NSSortDescriptor(key: “creationDate”, ascending: false) … Read more

PHImageManager requestImageForAsset returns nil sometimes for iCloud photos

I just went through this too. By my tests the issue appears on devices that have the “Optimize Storage” option enabled and resides in the difference between the two methods bellow: [[PHImageManager defaultManager] requestImageForAsset: …] This will successfully fetch remote iCloud images if your options are correctly configured. [[PHImageManager defaultManager] requestImageDataForAsset:…] This function only works … Read more

tech