使用PHAsset在多个设备上唯一访问iCloud照片 [英] Accessing iCloud photos uniquely on multiple devices using PHAsset

查看:327
本文介绍了使用PHAsset在多个设备上唯一访问iCloud照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在多个设备上唯一访问iCloud相册中的特定PHAsset?

Is there a way of accessing a specific PHAsset in an iCloud album uniquely on multiple devices?

我编写了一个简单的应用程序,其中列出了iCloud共享相册中的缩略图和.localIdentifier,(自然)它在不同的设备上显示相同的图像,但是,不同设备上的相同图像的localIdentifiers不同(并非意外,因为它是本地"标识符.

I have written a simple app that lists thumbnails and .localIdentifiers from an iCloud shared album, and (naturally) it shows the same images on different devices, however, the localIdentifiers are different for the same images on different devices (not so unexpected as it is a "local" identifier).

但是,我实际上要做的是将共享云的CoreData数据库中的记录与云中的图像相关联,而不是将图像嵌入CoreData中(这是一个家谱应用程序,可能包含数千张图像)-为此,无论设备如何,我都需要一个唯一的标识符.反正有这样做吗?

However, what I actually want to do is associate a record in a cloud-shared CoreData database with an image in the cloud, rather than embed the image in the CoreData (it's a genealogy app, with potentially thousands of images) - for this I would need an identifier that is unique regardless of the device. Is there anyway to do this?

推荐答案

不幸的是没有.在早期的iOS 8 Beta中,有一个云标识符(这正是您要寻找的),但后来从Photos API中将其删除.

Unfortunately not. In the early iOS 8 betas there was a cloud-identifier (which is exactly what you look for), but it was removed later on from the Photos API.

这篇关于使用PHAsset在多个设备上唯一访问iCloud照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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