Can push notifications be used to run code without notifying user?

后端 未结 4 1948
[愿得一人]
[愿得一人] 2020-12-11 05:58

I have an app which needs to communicate with a server (to refresh it\'s data) once every 24 hours. This needs to happen even if the app is not open, nor in the background.

4条回答
  •  不知归路
    2020-12-11 06:21

    With release of iOS 7 this is finally possible using Remote/Silent notifications. They work same as Push notifications but instead of alerting the user immediately they can fire up background fetch mode and upload/download new content.

    Here is simple tutorial:http://www.objc.io/issue-5/multitasking.html

提交回复
热议问题