G'day For a photos processing application, I have to fetch and filter out images and videos saved from other applications and exclude screenshots and screen recordings.
For screenshots I'm using
PHAsset'sPHAssetMediaSubtypeproperty to filter thePHAssetMediaSubtypePhotoScreenshottypes and it works really well.For screen recordings I haven't found a good way unfortunately. I stumbled onto this but it is not really working well because calling
PHAssetResourceon each asset is a very heavy operation. The closest I've found is to usePHAssetCollectionand use it's localised name but this not really a good way either.Lastly how do I filter out images and videos saved from other apps such as messenger apps and other apps such as tiktok. When you open apple's native Photos app and view info for an image/video it shows if the resource is taken from a camera or saved from other app. But is there a way to get this information from Photos Kit apis? Attached picture below to show what I mean by "saved by" shown on photos app.
Thanks!
