How do i get a date or metadata from a UIImage in this case:
//UIImagePickerControllerSourceType
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
//delegate return
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
// po info in console -> there is no metadata of the image where i can find the date
// Has anyone an idea how to get it?
}
If you are referring to EXIF metadata in the image (which includes date information), you can see this question for information on how to access it:
How to access photo EXIF in pictures taken from camera in iOS 4.0+?
The info dictionary contains a key called "UIImagePickerControllerMediaMetadata" which is another dictionary. Just NSLog allKeys of that to get the date key.
NSDictionary *metadata = [info objectForKey: UIImagePickerControllerMediaMetadata];
NSLog(@"%@",metadata);
Choose what you need from metadata.