PHObject localIdentifier的可靠性 [英] PHObject localIdentifier reliability

查看:370
本文介绍了PHObject localIdentifier的可靠性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在任何情况下localIdentifier可能会更改或不准确吗?我正在开发一个用于备份照片的应用程序,而我的同事们告诉我,不能信任localIdentifier.但是,在进行了一些研究之后,我一直找不到任何谈论此事的人.

Are there ever circumstances where the localIdentifier could change or not be accurate? I'm working on an application that backs up photos and have been told by my colleagues that the localIdentifier can't be trusted. However, after doing some research I have been unable to find anyone talking about this.

推荐答案

本地标识符有时会在更新iOS版本后更改.

在iOS两次更新后,我在自己的应用程序中看到PHAsset.localIdentifiers(照片API)发生了变化.上一次是在更新到iOS 11之后.该应用程序会跟踪localIdentifiers,以便可以根据各种谓词找到/排序特定的图像.

I've seen the PHAsset.localIdentifiers (Photo API) change after iOS updates twice - in my own Apps. The last time was after updating to iOS 11. The app in question kept track of localIdentifiers so specific images could be found/sorted according to various predicates.

从iOS10到11的更新完成后,由应用本地保存的所有 localIdentifiers变得无用,因为它们与任何设备图像都不匹配,尽管它们仍然存在于相机胶卷中.

As soon as the update from iOS10 to 11 finished, all the localIdentifiers saved locally by the app became useless as they didn't match any device images, although they still existed in the camera roll.

就像您一样,我一直在搜索有关此主题的信息,但没有成功.抱歉,我的答复是坏消息.

这篇关于PHObject localIdentifier的可靠性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆