Correct way to poll server in background

后端 未结 2 454
误落风尘
误落风尘 2021-01-31 05:49

Assuming this is possible, I would like my iOS application, when backgrounded, to poll a server (i.e. essentially, retrieve the contents of a URL every 30 minutes and notify the

2条回答
  •  走了就别回头了
    2021-01-31 06:15

    Assuming this is possible...

    Unfortunately that's a faulty assumption(!).

    You can't do it using the "multi tasking" on the iPhone, as it only allows certain kinds of background processing (GPS, VoIP, music). To do what you want you'll need to do the work on a server and use push notifications.

提交回复
热议问题