I need to delete all files that AVAssetDownloadTask
didn't manage to download while the app was running. I want to do this after the app has received the UIApplication.willTerminateNotification
.
I tried cancel of all AVAssetDownloadTasks
, but AVAssetDownloadDelegate
urlSession(_ session: URLSession, assetDownloadTask: AVAssetDownloadTask, didFinishDownloadingTo location: URL)
is not being called at the moment. I wanted to get all files' location urls.
If there are other ways to do this?
Will Download to Location
You can track final location with this delegate:
Tells the delegate the final location of the asset when the download completes.
This delegate callback should only be used to save the location URL somewhere in your application.
Any additional work should be done in:
Here is the official documentation pages: