I am using - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info to return a image taken from the camera inside my app and I wanted to get at the creation date for the image DateTimeOriginal. I kept getting a null value when I attempted to extract it but it turns out I was just using the wrong key. So here is how you extract it:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
NSDictionary *metaData = [info objectForKey:@"UIImagePickerControllerMediaMetadata"];
NSLog("Date: %@", [[metaData objectForKey:@"{Exif}"] objectForKey:@"DateTimeOriginal"]);
}
Well thats it! I kept trying to use the key Exit but that is not it. You use {Exif} for the key...
i love you so much right now
ReplyDelete