Local PHAssetResource availability

Is there a way to determine whether a specific PHAssetResource original is locally available/downloaded without requesting it?

If not, is the recommended approach to request the resource with PHAssetResourceRequestOptions.isNetworkAccessAllowed = false and handle networkAccessRequired error? Is that error the definitive signal that the requested resource is not locally available, or are there other errors that should be treated the same way?

Thanks!

Answered by Frameworks Engineer in 892636022

There is no API to determine if a specific PHAssetResource is locally available.

Checking for .networkAccessRequired seems like a reasonable workaround, as that should get returned if a PHAssetResourceManager request requires setting .isNetworkAccessAllowed to true.

Accepted Answer

There is no API to determine if a specific PHAssetResource is locally available.

Checking for .networkAccessRequired seems like a reasonable workaround, as that should get returned if a PHAssetResourceManager request requires setting .isNetworkAccessAllowed to true.

Local PHAssetResource availability
 
 
Q