Stephen
Code Block func getMetaData(_ asset:PHAsset) { let options = PHContentEditingInputRequestOptions() options.isNetworkAccessAllowed = true asset.requestContentEditingInput(with: options, completionHandler: {(contentEditingInput, _) -> Void in if let url = contentEditingInput?.fullSizeImageURL { let fullImage = CIImage(contentsOf: url) // get all the metadata self.allPhotoMetadata = fullImage?.properties ?? [:] // {TIFF} if let tiffDict = self.allPhotoMetadata["{TIFF}"] as? [String:Any] { if tiffDict["Make"] != nil { self.cameraData[cameraKeys.make] = tiffDict["Make"] } if tiffDict["Model"] != nil { self.cameraData[cameraKeys.model] = tiffDict["Model"] } if tiffDict["ImageDescription"] != nil { self.imageData[imageKeys.caption] = tiffDict["ImageDescription"] } } // {IPTC} if let iptcDict = self.allPhotoMetadata["{IPTC}"] as? [String:Any] { // if we didn't find a caption in the TIFF dict, try to get it from IPTC data // first try, Caption/Abtract, then ArtworkContentDescription if self.imageData[imageKeys.caption] == nil { if iptcDict["Caption/Abstract"] != nil { self.imageData[imageKeys.caption] = iptcDict["ArtworkContentDescription"] } else if iptcDict["ArtworkContentDescription"] != nil { self.imageData[imageKeys.caption] = iptcDict["ArtworkContentDescription"] } } } } }) }