Post

Replies

Boosts

Views

Activity

iOS 14 added captions to Photos. Can we access them?
New in iOS 14, we can now drag a photo up in the Photos app and add a caption. Is it possible to access this caption via PhotoKit or any other framework? I don't see a field for it on PHAsset. I've also tried the following snippet to see if I can see them stored on the image: let assets = PHAsset.fetchAssets(with: .image, options: nil) 				assets.enumerateObjects { (asset, index, stop) in 						let options = PHContentEditingInputRequestOptions() 						options.isNetworkAccessAllowed = true 						asset.requestContentEditingInput(with: options) { (input, properties) in 								guard let input = input, 											let fullSizeImageURL = input.fullSizeImageURL, 											let imageSource = CGImageSourceCreateWithURL(fullSizeImageURL as CFURL, nil), 											let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, nil) else { 										return 								} 								 								dump(imageProperties) 						} 				}
3
1
2.4k
Jan ’21