Objective c AVCaptureStillImageOutput缺少元数据

Objective c AVCaptureStillImageOutput缺少元数据,objective-c,exif,avcapturesession,Objective C,Exif,Avcapturesession,我使用以下代码捕获图像: [self.stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) { CFDictionaryRef exifAttachments = CMGetAttachment(imageSampleBuffer, kCG

我使用以下代码捕获图像:

[self.stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler:^(CMSampleBufferRef imageSampleBuffer, NSError *error) {
     CFDictionaryRef exifAttachments = CMGetAttachment(imageSampleBuffer, kCGImagePropertyExifDictionary, NULL);
     NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
     UIImage *image = [[UIImage alloc] initWithData:imageData];
     NSDictionary *metadata = (__bridge NSDictionary*)exifAttachments;
     NSLog(@"%@",metadata");
}];
以下是记录的输出:

ApertureValue = "2.526068811667588";
BrightnessValue = "-0.5270684580355165";
ExposureMode = 0;
ExposureProgram = 2;
ExposureTime = "0.06666666666666667";
FNumber = "2.4";
Flash = 16;
FocalLenIn35mmFilm = 35;
FocalLength = "4.28";
ISOSpeedRatings =     (
    500
);
MeteringMode = 5;
PixelXDimension = 3264;
PixelYDimension = 2448;
SceneType = 1;
SensingMethod = 2;
ShutterSpeedValue = "3.906905022631062";
SubjectArea =     (
    1631,
    1223,
    881,
    881
);
WhiteBalance = 0;

为什么我没有得到任何与时间相关的元数据?我想知道图像是什么时候拍摄的。

我确定,在将日期和时间添加到相机卷后,该日期和时间会添加到元数据中(开发人员没有做任何工作)。无需担心信息丢失

我是否需要自己添加“kCGImagePropertyExifDateTimeOriginal”值?似乎有点违反直觉。。。