PHFetchResult * reuslt = [PHAsset fetchAssetsWithOptions:nil];
[reuslt enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
PHAsset * imageT = (PHAsset *)obj;
if (imageT.mediaType == PHAssetMediaTypeImage ) {
NSLog(@"照片名%@", [imageT valueForKey:@"filename"]);
}
NSLog(@"======%@",obj);
}];
As shown in the above code, where can I find the key string behind valueForKey? I will check in the document to see if there is no key for this filename
http://chipmuck.pub/2016/09/2...
Regarding the use of PhotoKit, this article may solve your problem.
filename
is a private attribute, of course the document does not have it