You can use this code for photos and videos obtained from albums. info is the second parameter in the delegate method mentioned.
NSURL *mediaUrl = info[UIImagePickerControllerReferenceURL]; ALAssetsLibrary *assetsLibrary = [[ALAssetsLibrary alloc] init]; [assetsLibrary assetForURL:mediaUrl resultBlock:^(ALAsset *asset) { NSDate *date = [asset valueForProperty:ALAssetPropertyDate];
In addition, to make it work, you need to include AssetsLibrary in the project.
source share