Using silent push notifications to keep an iOS app in “Background” state

若如初见. 提交于 2019-12-24 12:47:34

问题


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?

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 Apps that send Push Notifications without first obtaining user consent, as well as apps that require Push Notifications to function, will be rejected

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


回答1:


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




回答2:


This is only possible via Cydia. Which means you will need to have a Repository, and jailbroken device for this to work.

The App Store will surely reject this, as it forces other apps to work in the background.



来源:https://stackoverflow.com/questions/24742490/using-silent-push-notifications-to-keep-an-ios-app-in-background-state

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!