handleEventsForBackgroundURLSession never called when a downloadTask finished

前端 未结 2 847
渐次进展
渐次进展 2021-02-20 17:15

I am using AFURLSessionManager, and set the manager as a singleton instance.

- (AFURLSessionManager *)backgroundSession
{
    static AFURLSessionManager *backgro         


        
2条回答
  •  孤独总比滥情好
    2021-02-20 17:28

    As stated by Apple:

    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.

    Hope it helps. Stefan

提交回复
热议问题