在后台更新我的应用程序 [英] Update my app when it is in background

查看:30
本文介绍了在后台更新我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更新我的应用程序的一些数据.考虑应用程序处于后台状态,它既不是 VoIP 也不是音乐或 GPS.是否可以更新/发送数据到后台应用程序?

I want to update some data to my application. Consider the application is in the background state, it is neither Voip or Music or GPS. Is it possible to update/send data to the application which is in background?

注意:我不想通知用户以便应用程序变为活动状态.

NOTE: I dont want to notify the user so that the application becomes active.

谁能帮帮我??

推荐答案

答案是肯定的,也不是.

The answer is yes and no.

Apple 确实允许您的应用程序在后台完成一个冗长的过程.但是,如果您不属于 VoIP、音乐或 GPS 类别,那么您将无法在后台运行.

Apple does allow you app to complete a lengthy process in the background. But if you does not fall in the Voip, music or GPS category then you can't run in background.

例如,如果您想向服务器发送一些数据,这可能需要一些时间,那么您可以将该进程标记为返回执行,直到它完成(或 10 分钟过去).

If for example you want to send some data to a server, which could take some time, then you can mark that process to back executed until it is finished (or 10min. have passed).

你会找到一些关于在后台执行有限长度任务

You will find some about Executing a Finite-Length Task in the Background

没有办法在后台运行计时器或任何类似的东西,您只能在应用程序后台运行之前完成您启动的任务.

There is not way to run timers or any thing like that in the backgroud, you can only finish a task you started before the app is backgrounded.

这篇关于在后台更新我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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