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.
Post
Replies
Boosts
Views
Activity
Filed a bug for this: FB12131501.
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.
Through a feedback I filed, I understood that the background downloader has been rewritten for iOS 17. We have retested this for over a week with iOS 17.3 and the issue has not appeared again. Very nice.