I have the following code that provides me access to metadata of a Video File that maybe saved locally or in iCloud. I am not sure if this is the best way to get access to only the metadata without downloading the Video file.
PHVideoRequestOptions *options = [PHVideoRequestOptions new];
options.networkAccessAllowed = YES;
options.deliveryMode = PHVideoRequestOptionsVersionOriginal;
[[PHImageManager defaultManager] requestAVAssetForVideo:currentAsset
options:options
resultHandler:^(AVAsset * _Nullable avAsset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
// gather the metadata that interests you.
}];
This code works, but the problem is my test device has all the Photo Library backed up to iCloud and this moves along very slowly for Videos. So I suspect that this code is downloading the Video from iCloud and then I am getting access to the Metadata.
Any advice on how to speed it along ? Thanks in advance.