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

前端 未结 2 716
再見小時候
再見小時候 2021-02-01 08:18

I\'m trying to make an iOS 5 app that features real-time things coming from the server. It will only use these whilst the app is running.

To make it real-time without po

2条回答
  •  独厮守ぢ
    2021-02-01 08:33

    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.

提交回复
热议问题