问题描述
最初下载我的应用时,用户需要下载一个大文件,例如 200MB(上限).我绝对不能指望用户在下载此文件之前保持应用程序打开.所以他/她可能会关闭应用程序和该应用程序将进入后台.
When my app is initially downloaded, the user needs to download a large file something like 200MB (upper limit). I definitely can't expect the user to keep the app open till this file is downloaded. So he/she might close the app & the app will go into background.
在这种情况下如何继续下载文件?这在 iOS 中是否可行?
How can I continue to download the file in this scenario? Is this even possible in iOS?
推荐答案
开始下载时可以启动后台任务:
It is possible to start a background task when you begin the download:
正在过渡到后台的应用可以请求额外的完成任何重要的最后一分钟任务的时间.
但是,这样的任务受限于系统未定义的执行时间.但是,在这种情况下,下载 200Mb 的文件可能是一项太大的任务.
However, such a task is limited to an undefined amount of execution time by the system. However, a 200Mb file download may be too large a task in this case.
这篇关于应用未激活时 iOS 后台下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!