尝试获取具有本地标识符的资产时出错

问题描述

我被这个问题困住了几天,但没有找到任何解决方案。当我单击照片库中的图片时,我尝试使用它的本地标识符获取资产,但是当我这样做时,照片库冻结并出现以下错误

"deamon 返回的错误:Error Domain=com.apple.accounts Code=7 "(null)""

标识符示例:

"499ECE4B-2B9B-488B-B0C9-412AA9CC918A/L0/001"

我如何尝试获取资产:

// Identifier is needed to fetch the PHAsset from the library
NSMutableArray* identifiers = [[NSMutableArray alloc] init];

for (int i = 0; i < results.count; i++)
{
    [identifiers addobject:results[i].assetIdentifier];
}

// Fetch actual pictures from identifier array
// "Error returned from deamon" most likely happens here
PHFetchResult<PHAsset *> *pickedAssets = [PHAsset fetchAssetsWithLocalIdentifiers:identifiers options:nil];

我希望任何人都可以在这里提供帮助。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)