使用静默推送通知将iOS应用保持在“背景"状态,状态 [英] Using silent push notifications to keep an iOS app in "Background" state

查看:172
本文介绍了使用静默推送通知将iOS应用保持在“背景"状态,状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过每隔几秒钟发送一次静默推送通知将iOS应用保持在背景"状态?我想定期运行后台任务,这似乎是一个可行的解决方案.如果是这样,那么在App Store使用条款下可以接受吗?

Is it possible to keep an iOS app in "Background" state by sending it a silent push notification every few seconds? I want to run background tasks on a regular interval and this seems like a viable solution. If so, is this acceptable under the App Store terms of use?

我计划构建的应用程序将依赖于此功能,并且我担心Apple会拒绝从App Store中使用它.

The app I am planning to build would rely on this functionality and I am concerned that Apple will reject it from the App Store.

具体来说,这是指南中的本节我不确定:

Specifically, it’s this section in the guidelines that I am not sure about:

5.1未经先征得用户同意而发送推式通知的应用,以及要求推式通知起作用的应用将被拒绝

从技术上讲,我的应用可以在不允许推送通知的情况下使用,但它不能发挥其在后台记录数据的主要功能.

Technically my app could be used without allowing push notifications but it wouldn’t serve its primary function of recording data in the background.

推荐答案

在iOS7中添加了其他背景模式,您可以查看可用的背景模式.

In iOS7 additional background modes were added, you can check out the available background modes here. IMHO, if you misuse one of the background modes, the app will probably be rejected, saying that , i don't think silent push notifications were meant for: keep an iOS app in "Background" state by sending it a silent push notification every few seconds.

另一件事是,静默推送通知受到速率的限制,如此处,所以我不确定是否每隔几秒钟就会发送一次.

another thing is that silent push notifications are rate limited as described here, so i'm not sure if they will be sent every few seconds.

也许您可以使用其他后台服务

maybe you can use another background service

这篇关于使用静默推送通知将iOS应用保持在“背景"状态,状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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