Using NSURLSession for uploading lots of prioritized files
Using NSURLSession for uploading lots of prioritized files
- Subject: Using NSURLSession for uploading lots of prioritized files
- From: Rick Mann <email@hidden>
- Date: Tue, 15 Jul 2014 11:59:30 -0700
We have an app that creates a lot of data (it interfaces with my company's camera device). The data consists of a metadata file of a few dozen K, and 1 - 100 (possibly more) 10 MB files. We upload each of these in turn, prioritizing the meta data. There's only ever one upload in flight at any time.
One of the problems we currently have is that if the user leaves the app, our uploads stop. Now that we've dropped support for iOS 6, I'd like to switch to using NSURLSession so the uploads can continue in the background. But stuff I've read recently suggests this won't work for us.
In a recent email thread ("Background download tasks intermittently stalling for 4 minutes"), Quinn suggested zipping up multiple files in order to transfer them in one request.
We can't really do that because the large files are potentially shared across metadata files ("jobs"), and we show upload progress while the app is running. It becomes nearly impossible to show meaningful progress in this case.
I could start all my uploads at once, but we want to ensure the (small) metadata is uploaded first, even if a new one is created some time after a bunch of other large file uploads have begun.
Any suggestions? Thanks!
--
Rick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden