我的iOS应用程序可以接收带有操作按钮的推送通知:按钮点击通过UrlSession和数据任务发送post http请求。当应用程序被挂起或不运行时,它工作得很好。但是当应用程序处于后台时,它就不起作用了,例如,当用户刚刚从底部滑动(或按下home按钮)时。推送操作句柄,但http请求不发送。从控制台os_logs of my iPhone中,我看到UrlSession无法从后台建立连接,并抛出一个错误代码=-1005“网络连接丢失了”。一旦
我一直在阅读URLSession downloadTasks,以及当应用程序进入后台或被iOS终止时它们是如何工作的。我希望下载继续,从我所读到的,这是可能的。just putting the app in the background (not terminating it) so I've commented out the lines belowconfig, delegate: DownloadManager.shared, dele
我有FirstViewController和按钮在SecondTableViewController中移动。在SecondTableViewController中,我有单元格,如果我单击单元格下载启动。问题:如果我在SecondTableViewController中从FirstViewController中开始下载并返回FirstViewController,然后在SecondTableViewController中移动,我会得到以下内容:
A background URLSession with id