2 Replies
      Latest reply: Oct 25, 2016 3:34 AM by CedricSoubrie RSS
      CedricSoubrie Level 1 Level 1 (0 points)

        I'm using background upload task to upload images to a server. When user has trouble with network the task resume correctly on iOS 9.3 when ntework gets back. My problem is that it's not working on iOS10 anymore.

         

        I've seen that there is a similar bug for downloadtask (see : https://forums.developer.apple.com/thread/47460, http://stackoverflow.com/questions/39346231/resume-nsurlsession-on-ios10/). The stackoverflow thread explains how to solve the problem for DownloadTask but it seems the fix not working for UploadTask.

         

        Two questions :

        1. Is it possible that this feature is totally down since iOS10 for all applications ???
        2. Is there a fix or a patch planned for future iOS version ?
        • Re: Upload in background not working on iOS10
          eskimo Apple Staff Apple Staff (7,485 points)

          iOS has never supported resuming an upload task, at least not in the same way that it supports resuming a download task.  The key difference is that the infrastructure for resuming a download is quite standard (QA1761, which explains how to do this yourself using NSURLConnection, discusses the basics), but this is not true for upload tasks.

          So, what are the specific symptoms of your upload problems?  To start, what error does the task fail with?  And what do you see on the wire?  An on-the-wire comparison between iOS 9 and 10 would be interesting.

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: Upload in background not working on iOS10
              CedricSoubrie Level 1 Level 1 (0 points)

              So, what are the specific symptoms of your upload problems? 

              On iOS9, if I disactivate network connection and then activate it back, the upload was resuming. On iOS10 nothing happens.


              To start, what error does the task fail with?  And what do you see on the wire?  An on-the-wire comparison between iOS 9 and 10 would be interesting.

              I don't have any error. The upload is just not starting back. What should I use to make a on-the-wire comparison ?