Background uploads with short-lived authorisation tokens.

Let’s say I have a hundred of big files to upload to a server, using requests with a short-lived authorisation token.

NSURLSession background upload describes a problem with adding too many requests, so the first question is: should we manage uploads manually, by which I mean queuing, postponing, retrying. Will we then fall into the same traps only in a different way?

What to do if tasks picked by the system have outdated token, and so fail. How to update a token: is there a delegate method (preferable pre iOS 13 compatibile) in which I can get a fresh token and modify a request header?

Is there any iOS specific design pattern or contract (Apple's list of server requirements) that would allow uploads to be resumable?

Answered by DTS Engineer in 738512022

There are a couple of things you can do here:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

There are a couple of things you can do here:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Background uploads with short-lived authorisation tokens.
 
 
Q