in xcode9 / ios 11, when I request PhAsset, xcode sometimes logs this information:
[ImageManager] Unable to load image data, /var/mobile/Media/DCIM/104APPLE/IMG_4807.JPG
On all devices / simulators iOS 10.xx everything is in order.
here is my method
PHImageRequestOptions *option = [[PHImageRequestOptions alloc] init];
option.resizeMode = PHImageRequestOptionsResizeModeFast;
option.networkAccessAllowed = YES;
return [[PHCachingImageManager defaultManager] requestImageForAsset:asset targetSize:size contentMode:PHImageContentModeAspectFill options:option resultHandler:^(UIImage * _Nullable image, NSDictionary * _Nullable info) {
BOOL downloadFinined = ![[info objectForKey:PHImageCancelledKey] boolValue] && ![info objectForKey:PHImageErrorKey];
if (downloadFinined && completion) {
completion(image, info);
}
}];
source
share