I did another test using a small sample based on https://stackoverflow.com/questions/18265760/get-exif-data-in-mac-os-development.
I wrote a simple console App with following code:
#import <Foundation/Foundation.h>
#import <ImageIO/ImageIO.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSURL *imageFileURL = [NSURL fileURLWithPath: [@"~/Desktop/IMG_1845.HEIC" stringByStandardizingPath]];
CGImageSourceRef imageSource = CGImageSourceCreateWithURL((CFURLRef)imageFileURL, NULL);
NSDictionary *treeDict;
NSMutableString *exifData;
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:NO],
(NSString *)kCGImageSourceShouldCache, nil];
CFDictionaryRef imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, ( CFDictionaryRef)options);
CFRelease(imageSource);
if (imageProperties) {
treeDict = [NSDictionary dictionaryWithDictionary:(__bridge NSDictionary*)(imageProperties)];
id exifTree = [treeDict objectForKey:@"{Exif}"];
exifData = [NSMutableString stringWithString:@""];
for (NSString *key in [[exifTree allKeys] sortedArrayUsingSelector:@selector(compare:)])
{
NSString* locKey = [[NSBundle bundleWithIdentifier:@"com.apple.ImageIO.framework"] localizedStringForKey:key value:key table: @"CGImageSource"];
id value = [exifTree valueForKey:key];
[exifData appendFormat:@"key =%@ ; Value = %@ \n", locKey,value];
}
NSLog(@" exifData %@", exifData);
}
return 0;
}
}
On macOS 14.6 I get following output:
$ ./exifTest
2023-01-25 09:44:32.532 exifTest[2409:21024] exifData key =Aperture Value ; Value = 1.169925002106682
key =Brightness Value ; Value = 4.710561089652368
key =Color Space ; Value = 65535
key =Date Time Digitized ; Value = 2022:10:27 16:31:42
key =Date Time Original ; Value = 2022:10:27 16:31:42
key =Digital Zoom Ratio ; Value = 1.2096
key =Exif Version ; Value = (
2,
3,
2
)
key =Exposure Bias Value ; Value = 0
key =Exposure Mode ; Value = 0
key =Exposure Program ; Value = 2
key =Exposure Time ; Value = 0.00684931506849315
key =FNumber ; Value = 1.5
key =Flash ; Value = 16
key =Focal Length In 35mm Film ; Value = 31
key =Focal Length ; Value = 5.7
key =ISO Speed Ratings ; Value = (
64
)
key =Lens Make ; Value = Apple
key =Lens Model ; Value = iPhone 14 back dual wide camera 5.7mm f/1.5
key =Lens Specification ; Value = (
"1.54",
"5.7",
"1.5",
"2.4"
)
key =Metering Mode ; Value = 5
key =Pixel X Dimension ; Value = 4032
key =Pixel Y Dimension ; Value = 3024
key =Scene Type ; Value = 1
key =Sensing Method ; Value = 2
key =Shutter Speed Value ; Value = 7.185264202431158
key =Subject Area ; Value = (
2016,
1508,
2319,
1327
)
key =Sub-second Time Digitized ; Value = 305
key =Sub-second Time Original ; Value = 305
key =White Balance ; Value = 0
on macOS 13.2 I get
$ ./exifTest
2023-01-25 09:37:19.219 exifTest[21828:415974] exifData key =(null) ; Value = 1.169925002106682
key =(null) ; Value = 4.710561089652368
key =(null) ; Value = 65535
key =(null) ; Value = 2
key =(null) ; Value = 2022:10:27 16:31:42
key =(null) ; Value = 2022:10:27 16:31:42
key =(null) ; Value = 1.2096
key =(null) ; Value = (
2,
3,
2
)
key =(null) ; Value = 0
key =(null) ; Value = 0
key =(null) ; Value = 2
key =(null) ; Value = 0.00684931506849315
key =(null) ; Value = 1.5
key =(null) ; Value = 16
key =(null) ; Value = 31
key =(null) ; Value = 5.7
key =(null) ; Value = (
64
)
key =(null) ; Value = Apple
key =(null) ; Value = iPhone 14 back dual wide camera 5.7mm f/1.5
key =(null) ; Value = (
"1.54",
"5.7",
"1.5",
"2.4"
)
key =(null) ; Value = 5
key =(null) ; Value = +02:00
key =(null) ; Value = +02:00
key =(null) ; Value = +02:00
key =(null) ; Value = 4032
key =(null) ; Value = 3024
key =(null) ; Value = 1
key =(null) ; Value = 2
key =(null) ; Value = 7.185264202431158
key =(null) ; Value = (
2016,
1508,
2319,
1327
)
key =(null) ; Value = 305
key =(null) ; Value = 305
key =(null) ; Value = 0
So it seems that the EXIF keys are no longer provided from the OS!