Filtering image types on PHPickerViewController photo lists (71832162)

var config = PHPickerConfiguration()
config.filter = PHPickerFilter.images

I want only 'png' files to be displayed when the PHPickerViewController photo list is opened.

I've read this post : https://developer.apple.com/forums/thread/687415

In this post, it is mentioned that filtering image formats by PHPickerConfiguration is not possible (2 years ago).

Is it still not possible? Has issue 71832162 not been resolved?

Accepted Reply

Do you mind explaining why you only want PNG images to be displayed?

We don't recommend filtering the picker using explicit file formats. It could be hard for users to understand why some of their photos aren't included in the picker.

If you want the picker to only show screenshots, you can use the .screenshots filter.

71832162 is resolved with the .playbackStyle(.animated) filter.

  • My application needs to pick up a custom PNG format file, including specific custom chunk created by my app. That's why I want to display only PNG files when the PHPickerViewController is opened.

    Thanks to your explanation; I understand it, but I think filtering PNG files is more reasonable in this situation. This is because, before using image picker, users are informed by application that 'only PNG files created by this app can be read.'

Add a Comment

Replies

Do you mind explaining why you only want PNG images to be displayed?

We don't recommend filtering the picker using explicit file formats. It could be hard for users to understand why some of their photos aren't included in the picker.

If you want the picker to only show screenshots, you can use the .screenshots filter.

71832162 is resolved with the .playbackStyle(.animated) filter.

  • My application needs to pick up a custom PNG format file, including specific custom chunk created by my app. That's why I want to display only PNG files when the PHPickerViewController is opened.

    Thanks to your explanation; I understand it, but I think filtering PNG files is more reasonable in this situation. This is because, before using image picker, users are informed by application that 'only PNG files created by this app can be read.'

Add a Comment