iPhone:无限期地在后台运行 [英] iPhone: Run in the background indefinitely

查看:148
本文介绍了iPhone:无限期地在后台运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一种方式来在后台一个iPhone应用程序的运行下去。这个应用程序将不使用定位服务或VoIP,反而是preforming特定任务(抱歉,但我没有明确说任务是什么)。该任务可以媲美检查,看看文件是否存在,然后睡了1秒。对于这个问题的目的,任务应该是运行下去。

I am looking for a way to have an iPhone application run in the background indefinitely. This app will not be using location services or VoIP, but instead be preforming a specific task (sorry but I cannot explicitly say what the task is). The task can be comparable to checking to see if a file exists and then sleeping for 1 second. For the purpose of this question, the task should be running forever.

任何帮助将是AP preciated。至于我可以从iPhone的文件是什么,我请求说是不可能的,所以我比较为难...

Any help would be appreciated. As far as I can tell from iPhone documentation what I am requesting is not possible, so I am rather stumped...

推荐答案

您是对的 - 除非你的原因,在后台运行,苹果已经定义的类别之一内符合(播放音频,VoIP等) ,你的应用程序将不会被允许在后台运行下去。如果你想这样做的理由是真正令人信服,你可能会想谈论苹果约让他们允许它。期待一个长期艰苦的战斗,但。更实际的做法是寻找那些可以达到同样的效果,喜欢跑步的背景code服务器上注册,或从系统的各种通知的方式。

You're right -- unless your reason for running in the background fits within one of the categories that Apple has defined (playing audio, voip, etc.), your app won't be allowed to run indefinitely in the background. If the reason you want to do that is really compelling, you might want to talk to Apple about getting them to allow it. Expect a long uphill battle, though. A more pragmatic approach would be to look for ways that you can achieve the same effect, like running your background code on a server or registering for various notifications from the system.

这篇关于iPhone:无限期地在后台运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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