Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在后台运行时计划后台NSURLSessionDataTask_Ios_Nsurlsession - Fatal编程技术网

Ios 在后台运行时计划后台NSURLSessionDataTask

Ios 在后台运行时计划后台NSURLSessionDataTask,ios,nsurlsession,Ios,Nsurlsession,好吧,这听起来很疯狂。。。但是我有一个场景,我想使用NSURLSession系统来安排后台数据任务,如果我的应用程序是通过远程通知在后台启动的 我所观察到的是,在我安排并恢复任务之后,当我调用fetchCompletionHandler时,我的任务从未真正执行过 如果我只是将对fetchCompletionHandler的调用延迟几秒钟,那么我的任务实际上会执行 是否支持在后台运行时安排后台下载 我知道我也可以使用一个普通的异步请求,在请求完成时调用fetchCompletionHandler,

好吧,这听起来很疯狂。。。但是我有一个场景,我想使用NSURLSession系统来安排后台数据任务,如果我的应用程序是通过远程通知在后台启动的

我所观察到的是,在我安排并恢复任务之后,当我调用fetchCompletionHandler时,我的任务从未真正执行过

如果我只是将对fetchCompletionHandler的调用延迟几秒钟,那么我的任务实际上会执行

是否支持在后台运行时安排后台下载

我知道我也可以使用一个普通的异步请求,在请求完成时调用fetchCompletionHandler,但是我希望为这个特定的请求使用一个单独的系统,而不必在后台启动应用程序时对其进行特殊处理