In iOS 14.0, Apple introduced a new way to pick images from the device’s photo library using PHPickerViewController. (If you are not aware of PHPickerViewController, I strongly recommend you to read about PHPickerViewController first.)
Different apps have different requirements. For example, a hi-res video editing app might be interested in showing cinematic videos and videos.
A screenshot stitching app might be interested in showing screenshots upfront. From iOS 16.0, Apple has introduced new APIs, making filtering media very easy.
If your app wants to show cinematic videos, you can use the
PHPickerViewController example of filtering cinematic videos
Similarly, you can filter
depthEffectPhotos, and much more. You can read the
PHPickerFilter documentation to learn more about the new filter enums.
To filter only screenshots
To filter only screen recordings
To filter only depth effect photos
The best part is that all the filters except
bursts are backported to iOS 15.0
You can also add compound filters and refine your media results using
not . They are also backported to iOS 15.0
About the author
- Rizwan Ahmed - Senior iOS Engineer, speaker, and an open source enthusiast. Twitter - https://twitter.com/rizwanasifahmed
Show your support to indie devs by downloading their apps from the banner displayed below. It will help them build great apps in these tough times.
Winya: Best live streaming app
Become a Streamer by starting a live stream from your iPhone/iPad to Twitch/YouTube or any live streaming service of your choice. Download the app and become a creator now!