ios11 [ImageManager]无法加载图像数据

时间:2017-09-22 08:48:17

标签: ios

在xcode9 / ios 11中,当我请求PhAsset时,xcode有时会记录此信息:

[ImageManager] Unable to load image data, /var/mobile/Media/DCIM/104APPLE/IMG_4807.JPG

在所有iOS 10.x.x设备/模拟器上,一切都很好。

这是我的方法

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);
    }
}];

0 个答案:

没有答案