My app does really large uploads. Like several GB. We use the AWS SDK to upload to S3.
It seemed like using BGContinuedProcessingTask to complete a set of uploads for a particular item may improve UX as well as performance and reliability.
When I tried to get BGContinuedProcessingTask working with the AWS SDK I found that the task would fail after maybe 30 seconds. It looked like this was because the app stopped receiving updates from the AWS upload and the task wants consistent updates. The AWS SDK always uses a background URLSession and this is not configurable. I understand the background URLSession runs in a separate process from the app and maybe that is why progress updates did not continue when the app was in the background.
Is it expected that BGContinuedProcessingTask and background URLSession are not really compatible? It would not be shocking since they are 2 separate background APIs.
Would the Apple recommendation be to use a normal URLSession for this, in which case AWS would need to change their SDK?
Or does Apple think that BGContinuedProcessingTask should just not be used with uploads? In other words use an upload specific API.
Thanks!
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
iOS
Beta
Background Tasks
CFNetwork