关闭应用程序后,后台传输下载任务失败 [英] Background transfer download task failed when app was closed
本文介绍了关闭应用程序后,后台传输下载任务失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了后台nsurlsession来执行下载任务.该应用程序在后台运行时效果很好.但是,当我关闭应用程序时(双击主页"按钮并向上滑动),下载任务似乎被取消并失败了,这使我在重新启动应用程序时从头开始重新下载.根据Apple文件,即使该应用程序不再运行,后台传输也能正常工作.我做错什么了吗?
I have created background nsurlsession to perform download task. It worked well when the app was in background. However, download task seems to be canceled and failed when I closed the app (double click "Home" button and swipe up), and it made me to download from the beginning again when I relaunched the app. According to Apple document, background transfer works even the app is no longer running. Am I doing anything wrong?
推荐答案
查看全文