NSURLSessionTask never calls back after timeout when using background configuration

后端 未结 5 899
面向向阳花
面向向阳花 2021-02-01 05:35

I am using NSURLSessionDownloadTask with background sessions to achieve all my REST requests. This way I can use the same code without have to think about my applic

5条回答
  •  遥遥无期
    2021-02-01 06:25

    I have come up to the exact same problem. One solution that i have found is to use two sessions, one for foreground downloads using the default configuration and one for background downloads with background configuration. When changing to the background/foreground generate resume data and pass it from one to the other. But i am wondering if you have found another solution.

提交回复
热议问题