My app is built with Xcode 26.1 and uses a customized photo picker implemented with the PhotoKit Framework.
After saving an image attached in the Gmail app to the Photos app on iOS 26.6.1 or iOS 26.6.2, when my app selects and loads that image, the Exif XResolution and YResolution values are both reported as 0.
Is this an iOS bug?
The following code retrieves the XResolution and YResolution values from the PHAsset of the selected image.
private func selectAsset(_ asset: PHAsset) {
let options = PHImageRequestOptions()
options.isNetworkAccessAllowed = true
options.deliveryMode = .highQualityFormat
PHImageManager.default().requestImageDataAndOrientation(for: asset, options: options) { data, _, _, _ in
DispatchQueue.main.async {
if let data {
let options = PHImageRequestOptions()
options.isNetworkAccessAllowed = true
options.deliveryMode = .highQualityFormat
PHImageManager.default().requestImageDataAndOrientation(for: asset, options: options) { data, _, _, _ in
guard let data,
let source = CGImageSourceCreateWithData(data as CFData, nil),
let properties = CGImageSourceCopyPropertiesAtIndex(source, 0, nil) as? [CFString: Any],
let tiff = properties[kCGImagePropertyTIFFDictionary] as? [CFString: Any] else {
print("XResolution: NaN, YResolution: NaN")
return
}
let xResolution = tiff[kCGImagePropertyTIFFXResolution] as? Double
let yResolution = tiff[kCGImagePropertyTIFFYResolution] as? Double
print("XResolution: \(xResolution.map { String($0) } ?? "NaN"), YResolution: \(yResolution.map { String($0) } ?? "NaN")")
}
}
}
}
}
Result on iOS 26.6
XResolution: 72, YResolution: 72
Result on iOS 26.6.1 and 26.6.2
XResolution: 0, YResolution: 0
1
0
38