如果应用程序处于后台模式,则不会发送任何请求 [英] No Request will send if app is in background mode Optionen

查看:48
本文介绍了如果应用程序处于后台模式,则不会发送任何请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果主屏幕按钮为按下.在后台模式下,RKRequestQueue的任何请求都不会被发送,因此该应用程序不会收到来自后台服务器的响应,并且应用无法更新数据.

With a trick it is possible to run the app, if the home button is pressed. In the background mode, no request with RKRequestQueue will be send, so the app receive no response from backande server and the app can't update the data.

推荐答案

这是标准行为.当应用程序变为活动状态(即正在运行并且不再在后台)时,您可能希望在应用程序委托中实现-(void)applicationDidBecomeActive:(UIAplication *)application 方法,该方法将在以下位置恢复您退出了,或者重新提交您的请求,无论您的情况如何,都可以重新启动请求队列.

This is standard behavior. When the app becomes active (i.e. is running and no longer in the background), you may want to implement the -(void)applicationDidBecomeActive:(UIAplication *)application method in your application delegate which would resume where you left off, or to resubmit your request, restart your request queue, whatever your situation requires.

这篇关于如果应用程序处于后台模式,则不会发送任何请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆