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

前端 未结 2 715
再見小時候
再見小時候 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.

    0 讨论(0)
  • 2021-02-01 08:41

    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.

    0 讨论(0)
提交回复
热议问题