[英]Photo library display empty in some devices using ALAssetsLibrary
// photo gallary or from library
NSUInteger groupTypes;
groupTypes = ALAssetsGroupAlbum | ALAssetsGroupLibrary | ALAssetsGroupSavedPhotos | ALAssetsGroupPhotoStream ;
[assetsLibrary enumerateGroupsWithTypes:groupTypes usingBlock:listGroupBlock failureBlock:failureBlock];
I am trying to fetch images libraries from iPad devices using ALAssetsLibrary. 我正在尝试使用ALAssetsLibrary从iPad设备获取图像库。 From all the fetched libraries, "Photo library" shows empty in some devices.
在所有获取的库中,“照片库”在某些设备中显示为空。
If you are using ALAssetsGroupPhotoStream
then it will return asset-url but cannot generate image from that url. 如果您使用的是
ALAssetsGroupPhotoStream
,它将返回资产URL,但无法从该URL生成图像。 Because stream assets are not storing their bitmap. 因为流资产未存储其位图。
Instead you should avoid that and get only those images which are store in device. 相反,您应该避免这种情况,只获取存储在设备中的那些图像。
add this line where you allocate your ALAssetsLibrary. 在分配ALAssetsLibrary的位置添加此行。
[ALAssetsLibrary disableSharedPhotoStreamsSupport];
It will not return shared stream photos which are nil. 它不会返回共享的流照片,为nil。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.