Post

Replies

Boosts

Views

Activity

Reply to Resuming a file download in the background on iOS sometimes corrupts the file
That's an interesting document, as it gives some details on how iOS handles apps in the background. Thanks for sharing. However, it doesn't help me as I'm using a newer API. NSURLSession configured with backgroundSessionConfigurationWithIdentifier. This is a newer API than mentioned in that document. We are following the Download Files in the Background document. However, I cannot find documentation about what happens when iOS decides to resume a background download later.
Apr ’23
Reply to Resuming a file download in the background on iOS sometimes corrupts the file
Thanks Quinn, that look similar to what the documentation says, so it seems to apply nowadays too. The bit you mention about the temporary file being managed internally by NSURLSession is interesting in our case. We use one NSURLSession for downloads when our app is in the foreground, but resume with background downloads on a second, differently configured NSURLSession when the app is suspended. From this, it seems that we are running into the case where the temp file is cleaned up, since we cancel the download (with resume data) on the original session.
Apr ’23