Does NSUrlSession continue file transfer if the app is killed from task manager?

前端 未结 2 1670
梦谈多话
梦谈多话 2020-12-31 17:07

I have tried various samples from the web (the last one being this one) in order to get a better understanding of NSUrlSession.

What I was hoping to see

2条回答
  •  佛祖请我去吃肉
    2020-12-31 17:59

    No - the app is not relaunched for background downloads when the user has force quit.

    The iOS8 documentation for application:didReceiveRemoteNotification:fetchCompletionHandler: says:

    Use this method to process incoming remote notifications for your app. Unlike the application:didReceiveRemoteNotification: method, which is called only when your app is running in the foreground, the system calls this method when your app is running in the foreground or background. In addition, if you enabled the remote notifications background mode, the system launches your app (or wakes it from the suspended state) and puts it in the background state when a push notification arrives. However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.

提交回复
热议问题