Post

Replies

Boosts

Views

Activity

Reply to Correct way to delete partially downloaded streams
Hi Polyphonic, thanks so much for the quick reply. Yes, I do just that. I store the URL from aggregateAssetDownloadTask:willDownloadTo and try to generate a bookmark from it on cancel. The only difference is, in my project I don't use UserDefaults for storage. My sequence is -> Store the URL, report progress to the UI. On Cancel -> Cancel Task -> Receive Delegate callback -> General cleanup which also involves deleting the asset by constructing a bookmark.       let url = try URL(resolvingBookmarkData: localURL,                   bookmarkDataIsStale: &bookmarkDataIsStale) try FileManager.default.removeItem(at: url) I very often see the partial downloads remain on the device.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’22
Reply to Correct way to delete partially downloaded streams
Hi Polyphonic, thanks so much for the quick reply. Yes, I do just that. I store the URL from aggregateAssetDownloadTask:willDownloadTo and try to generate a bookmark from it on cancel. The only difference is, in my project I don't use UserDefaults for storage. My sequence is -> Store the URL, report progress to the UI. On Cancel -> Cancel Task -> Receive Delegate callback -> General cleanup which also involves deleting the asset by constructing a bookmark.       let url = try URL(resolvingBookmarkData: localURL,                   bookmarkDataIsStale: &bookmarkDataIsStale) try FileManager.default.removeItem(at: url) I very often see the partial downloads remain on the device.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to Pattern for AsyncStream - to many relationship
Thank you @eskimo :) Here is the link: https://forums.swift.org/t/consuming-an-asyncstream-from-multiple-tasks/54453/7
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’22