iOS app with real-time updates from server: Socket (using streams) or Apple Push Notification service?

自闭症网瘾萝莉.ら 提交于 2019-12-02 18:23:48

Does it really need to be "full real time"? From my point of view i would prefer http since it is already well integrated into the iOS SDK. Its easy to understand, maintain and implement and plenty of documentation is on the web. So maybe a http poll every minute or so will be enough (depending on the app and the number of users). Please consider firewalls too! Traffic to unknown ports maybe denied due to firewall policies of provider or local wifi. So if you really need realtime connectivity I guess you have to use sockets.

Sockets would be my choice. I do not know how time critical your application is, but sockets might perform better as APNs if realtime is a must.

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