• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

保持在后台运行的 iPhone 应用程序完全可操作

用户头像
it1352
帮助201

问题说明

首先,我知道仅支持 voip、音频和定位应用程序在后台运行,并且它们将在播放音频或使用定位服务等时运行.

first of all, I know there is only support for voip, audio and location apps to run in background and that they will run just while the audio is been played or while using location services, etc.

我想知道的是,是否有办法让我的应用程序在后台完全运行,不管对电池寿命的影响.

What I want to know is if there is a way to keep my app running on background fully operational, doesn't matter the impact on battery's life.

这样,我的应用程序的用户可以从设置中进行选择,以便在他想要的任何时候并且只在他希望的时间内保持应用程序的活动.例如,如果他正在等待需要运行应用程序的东西,则在收到消息后,他可以关闭保持活动功能.

That way the user of my app can select from settings to keep alive the app whenever he wants and just for the amount of time he wish. e.g if he is waiting for something that requires the app to be running, after receiving the messages he can turn off the keep alive functionality.

我不知道这是否可能,但我读过一些这样说的帖子,但不幸的是他们没有说如何 =(

I don't know if this is possible but I had read some post that say so but unfortunately they didn't say how to =(

更新:在 本教程,我发现 Acrobits 在 Apple Store 上有两个应用程序可以强制应用程序在后台保持活动和唤醒".那么有办法做到这一点吗?

UPDATE: In this tutorial, I found that Acrobits has two apps on the Apple Store that "can force the application to stay alive and awake in the background". So there is a way to do this?

正确答案

#1

您可以在应用程序被定向到后台后的有限时间内执行任务,但仅限于提供的持续时间.运行时间超过此时间将导致您的应用程序终止.请参阅Completing a Long-Running Task in the Background" 部分的 iOS 应用程序编程指南了解如何执行此操作.

You can perform tasks for a limited time after your application is directed to go to the background, but only for the duration provided. Running for longer than this will cause your application to be terminated. See the "Completing a Long-Running Task in the Background" section of the iOS Application Programming Guide for how to go about this.

其他人已将在后台播放音频作为后台进程保持活力的一种手段,但 Apple 仅在音频播放是合法功能的情况下才会接受此类应用程序.Apple 发布的审查指南第 2.16 条规定:

Others have piggybacked on playing audio in the background as a means of staying alive as a background process, but Apple will only accept such an application if the audio playback is a legitimate function. Item 2.16 on Apple's published review guidelines states:

多任务应用程序只能使用为他们预期的后台服务用途:VoIP、音频播放、位置,任务完成,本地通知等

Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tangejekc
系列文章
更多 icon
同类精品
更多 icon
继续加载