Save ARFrame capturedImage with camera EXIF data

According to the document, exifData is now provided for IOS 16 in ARFrame object. I'm saving the capturedImage in this way right now. How can I store the image with the corresponding exif data?

let ciImageColor = CIImage(cvPixelBuffer: frame.capturedImage)
let contextColor = CIContext.init(options: nil)
let cgImageColor = contextColor.createCGImage(ciImageColor, from: ciImageColor.extent)!
let uiImageColor = UIImage(cgImage: cgImageColor, scale: 1, orientation: UIImage.Orientation.up)

uiImageColor.jpegData(compressionQuality: 0.0)!.write(to: colorJpgURL)

Take a look at this Stackoverflow discussion: https://stackoverflow.com/questions/35758510/save-the-exif-metadata-using-the-new-phphotolibrary Seems like this should be doable via ImageIO's CGImageDestinationAddImageFromSource()

Save ARFrame capturedImage with camera EXIF data
 
 
Q