PHAsset get original file name

后端 未结 4 1020

I wonder if there any way to get the original file name using PHAsset?

I use the following code to extract the file info.

   [[PHImageManager defaultMa         


        
4条回答
  •  梦毁少年i
    2021-01-31 20:22

    On iOS 8 your solution is the right (and only approach) to get a filename at all.

    On iOS 9 this works:

    NSArray *resources = [PHAssetResource assetResourcesForAsset:asset];
    NSString *orgFilename = ((PHAssetResource*)resources[0]).originalFilename;
    

提交回复
热议问题