2017-06-16 50 views
0

我的程序必须每30分钟发送一次服务器请求。即使手机没有启动。当程序从服务器接收到json数据时,它必须向用户显示推送通知。它有可能与否?如果是的话,我知道如何写json请求等,请帮我在哪里可以做到这一点,以及如何显示通知给用户。谢谢 P.S.我编码在斯威夫特3当我的应用程序未在手机打开时,我可以向服务器请求吗?

+0

执行后台程序:https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/ BackgroundExecution.html和推送通知https://www.raywenderlich.com/156966/push-notifications-tutorial-getting-started –

+0

@АзаматБулегенов:最简单的答案,你不能! –

回答

相关问题