更新我的应用程序时,它在后台 [英] Update my app when it is in background
问题描述
我想一些数据更新到我的应用程序。考虑应用程序在后台运行状态,这样既不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.
谁能帮我?
推荐答案
答案是yes和no。
The answer is yes and no.
苹果并让你的应用程序来完成一个漫长的过程在后台运行。但是,如果你没有在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).
您会发现一些关于<一个href=\"https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html\"相对=nofollow> 在后台执行一个有限长度的任务
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屋!