我正在构建一个应用程序,在iOS/macOS用户之间通过photos应用程序的云共享相册共享照片。我需要每一张照片被描述的几个数字携带应用程序的具体参数。
我在研究几个想法,但都没有用:
- unfortunately, Apple cloud shared albums do not carry meta-data fields writable by a user
IMG_1234-i1-i2-...-iN.JPEG- unfortunately, I can't find a way to change the filename of a photo in the Photos app.
- I assume that `PHObject.localIdentifier` is not persistent across the cloud shared albums read on different devices. I did not check this, but why otherwise the `identifier` would be called `local`?
有没有办法将少量数据绑定到iOS/macOS应用程序云中共享相册中的照片
发布于 2019-08-27 20:13:43
按照我在this answer中找到的私有API的描述,我创建了PHAsset的以下扩展:
extension PHAsset {
var cloudIdentifier: String {
return (self.value(forKey: "cloudIdentifier") as? String) ?? "?"
}
}您现在可以从一个cloudIdentifier实例中获得的PHAsset在任何共享相同相册的设备上都是在整个云中持久的。使用持久的PHAsset标识符,可以从初始问题实现解决方案#3。
https://stackoverflow.com/questions/57562286
复制相似问题