解决方法
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.
更新:(如评论中所述)
Refer the apple documentation,它说,
This method lets your app know that it is about to be terminated and purged from memory entirely. You should use this method to perform any final clean-up tasks for your app,such as freeing shared resources,saving user data,and invalidating timers. Your implementation of this method has approximately five seconds to perform any tasks and return. If the method does not return before time expires,the system may kill the process altogether.
For apps that do not support background execution or are linked
against iOS 3.x or earlier,this method is always called when the user
quits the app. For apps that support background execution,this method
is generally not called when the user quits the app because the app
simply moves to the background in that case. However,this method may
be called in situations where the app is running in the background
(not suspended) and the system needs to terminate it for some reason.After calling this method,the app also posts a UIApplicationWillTerminate notification to give interested objects a chance to respond to the transition.