[PhotoKit] Querying "Select Photos..." (PHAccessLevelAddOnly) assets

The Photos Library has a new level of permission called PHAccessLevelAddOnly which grants access to a selected set of assets defined by the User.

In my personal side project app, I render a custom Camera Roll UI and when I select "Select Photos..." and give access to a few photos the following occurs:
  • The selected photos appear normally in my UI

  • The unselected photos appear with a very low resolution in my UI

Is there a way to leverage PHAsset/PHFetchResult/PHAssetCollection etc. to query for only the Photos my app has access to?

Thanks in advance!
Answered by Frameworks Engineer in 614809022
Thanks for filing the feedback! We've been able to reproduce the problem you described, but only when using the simulator. You can avoid this issue by testing on a iPhone or iPad running the iOS 14 developer seed.
You're describing the photos privacy authorization status, PHAuthorizationStatusLimited. When a user opts into that privacy setting (by choosing the "Select Photos..." option from the privacy alert) your app shouldn't be able to fetch any photos other than those selected by the user - other photos/videos shouldn't be available at all.

You're describing the photos privacy authorization status, PHAuthorizationStatusLimited. When a user opts into that privacy setting (by choosing the "Select Photos..." option from the privacy alert) your app shouldn't be able to fetch any photos other than those selected by the user - other photos/videos shouldn't be available at all. 

Unfortunately, this is not the behavior I'm seeing with Version 12.0 beta (12A6159).
I've attached a code sample where I set up a screen that prompts for permission and displays all the available Photos that result from calling:
Code Block
[PHAsset fetchAssetsWithOptions:options]


I then fetch the UIImages from the collection of PHAssets and display them on a collection view.

What I end up seeing is all the images but the "un-selected" ones are blurry and low rest. Is this possibly a bug?

I'm unable to attach images so let me know if there a way to upload images or a sample project. I hope the sample code I attached is enough to reproduce.



Unfortunately, this is not the behavior I'm seeing with Version 12.0 beta (12A6159).

I've attached a code sample where I set up a screen that prompts for permission and displays all the available Photos that result from calling: 
Code Block

Code Block
[PHAsset fetchAssetsWithOptions:options]




I then fetch the UIImages from the collection of PHAssets and display them on a collection view.

What I end up seeing is all the images but the "un-selected" ones are blurry and low resolution.

I'm unable to attach images so let me know if there a way to upload images or a sample project. I hope the sample code I attached is enough to reproduce.
I filed FB7770364 for this.
Accepted Answer
Thanks for filing the feedback! We've been able to reproduce the problem you described, but only when using the simulator. You can avoid this issue by testing on a iPhone or iPad running the iOS 14 developer seed.
[PhotoKit] Querying "Select Photos..." (PHAccessLevelAddOnly) assets
 
 
Q