0

I am wondering what happens to background task after device reboot? Is there a way to make the system restart unfinished tasks once the device reboots?

Reading online I couldn't find a definite answer. I found people talking about making the application use VoIP or location updates backgrounding, this isn't really what I want.

I just want to make sure all my background tasks, which include uploading files to the server, be finished even after reboot. By finished I mean all files are uploaded as expected.

Edit

I want to use AWSS3GetPreSignedURLRequest to do my uploads in the background as AWS documentation (http://docs.aws.amazon.com/mobile/sdkforios/developerguide/s3transfermanager.html#use-pre-signed-urls-to-transfer-objects-in-the-background) explains.

So, I want to be sure that if there is a reboot, my task finish all the uploads as expected.

  • What kind of background task are you referring to? There are many and there are differences. [https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW5](Is the place to go for definite answers.) – Nick Weaver Oct 01 '15 at 15:36
  • not really sure which one would it be, but whatever AWSS3GetPreSignedURLRequest uses. – Mohamed El-Halawani Oct 01 '15 at 15:47
  • Have a look at [this answer](http://stackoverflow.com/questions/30803238/resuming-tasks-using-nsurlsession-when-app-removed-from-background-or-on-device). It looks like after browsing the aws library a bit that it is using NSURLSession. So the rules of NSURLSession apply. – Nick Weaver Oct 01 '15 at 15:59
  • Thank you very much @NickWeaver, that helps indeed. – Mohamed El-Halawani Oct 01 '15 at 16:52

0 Answers0