0

I have a problem with PhotoKit: In my app, i get a mp4 video from remote camera and save it to phone filesystem in documents folder. After this, I create an asset by using PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL:) and add it to custom assetCollection. After that, I can see this video in Photos.app and I can delete it by tapping trash button. But if I delete it from Photos.app list, it won't be displayed in list but original source file won't be removed from phone memory.

I want source file to be removed when user delete asset. How can I do this? Any ideas?

Thanx in advance!

  • I assume you are using iOS 8+ bc of `PHAssetChangeRequest`... recent versions of Photos.app have added a "Recently Deleted" folder. (I can't find documentation on that change, maybe the app was rolled with the API...) but if you are using *only* trash button, you should check to see if it is really deleted. – benc Mar 21 '19 at 16:53
  • @benc thanks for clarification, but this didn't help. No matter, even f I force-delete video from "Recently Deleted" --- file remains in memory :( – Vasiliy Fedotov Mar 21 '19 at 17:06
  • Yeah, I'm about to start using PhotoKit (survived just `UIImagePicker`...) but I did a quick skim of the docs and couldn't find an explanation. – benc Mar 21 '19 at 17:08

0 Answers0