PHPickerViewController in Limited Access photos mode

Dear Experts,

In "limited access" photos mode, I present a PHPickerViewController. It shows the entire photo library, with a note at the top saying that the app can only access the items that I select. I select a photo.

In the delegate method, I get a PHPickerResult containing a plausible-looking string for the assetIdentifier. It's the same string that I get for that photo in "full access" mode.

Should this photo now be accessible, or do I need to do something else at this point?

When I call fetchAssetsWithLocalIdentifiers using this assetIdentifier, I get no results. When I call cloudIdentifierMappingsForLocalIdentifiers, I get error PHPhotosErrorIdentifierNotFound. In "full access" mode, both work OK.

What am I missing?

Thanks.

Answered by Engineer in 794483022

In this case, the asset data is only accessible through the item provider, not the asset identifier.

In this case, the asset data is only accessible through the item provider, not the asset identifier.

In this case, the asset data is only accessible through the item provider, not the asset identifier.

OK. I'm using the localIdentifier within the app, and the cloudIdentifier in saved files, to identify photos. I'm not persistently copying photo image data into the app. It seems that this is not compatible with "limited access" permissions and PHPickerViewController.

Is there a way to configure PHPickerViewController so that it only displays photos that the user has already granted access to, in "limited access" mode?

Or alternatively, instead of presenting the PHPickerViewController I could call presentLimitedLibraryPicker - except this doesn't help in the (common?) case where the user wants to select a photo that they already granted access to.

I guess I'll just not support limited access mode. I wonder how many users try to use it?

FB14265010

PHPickerViewController in Limited Access photos mode
 
 
Q