PHPicker Image Selection

When using PHPicker and selecting multiple images, is there a way to have those images already preselected when you re-open the image picker?

Say a user is able to add 5 images to a post. They open the PHPicker and add 3. Later they decide they want to add an additional 2 so they open the PHPicker again. But when the PHpicker is opened again, no images are selected so they are able to select the same images they've already chosen beforehand.

Is it possible for the phpicker save it's previous state or is there a way to pass in what images should be selected upon opening the picker?

You can use the new preselectedAssetIdentifiers API introduced in iOS 15. You don’t need to request any photo library access.

For detailed explanation, please check out the sample code or the WWDC session.

PHPicker Image Selection
 
 
Q