我希望看到的内容:即使触发它们的应用程序被杀死(例如用户通过任务管理器),文件下载仍将继续.然而,这似乎没有发生.
如果应用程序被终止,这是配置问题还是后台文件传输不起作用?
我认为整个想法是iOS将重启应用程序.
解决方法
Documentation for backgroundSessionConfigurationWithIdentifier:
@H_403_7@ @H_403_7@If an iOS app is terminated by the system and relaunched,the app can
use the same identifier to create a new configuration object and
session and retrieve the status of transfers that were in progress at
the time of termination. This behavior applies only for normal
termination of the app by the system. If the user terminates the app from the multitasking screen,the system cancels all of the session’s background transfers. In addition,the system does not automatically relaunch apps that were force quit by the user. The user must explicitly relaunch the app before transfers can begin again.