Shadowman
Shadowman

Reputation: 12039

APNS? Or Polling? Which is more reliable?

I'm working on a small messaging app, similar to IM or SMS text messages. I'm obviously planning on using Apple's Push Notification Service (APNS) for notifying users of new messages when the app is not running. The question is, what about when it is running? Should I rely on APNS to notify the app when to refresh the list of messages that the user has received? Or, should I do periodic polling to grab any new messages?

My app will be making use of RestKit 0.20 as its web service client library. Polling should be easy enough to configure there, but I'm concerned about the additional overhead of creating the connections, as well as the increased bandwidth utilization that polling will create.

Is APNS reliable enough that I can use it to trigger a UI refresh when a new message is received? Or should I handle it manually within the app itself via polling?

Upvotes: 0

Views: 699

Answers (1)

WhoaItsAFactorial
WhoaItsAFactorial

Reputation: 3558

APNS is very reliable, so you can get away with using it to refresh the application when new messages come in. However, it isn't 100%, so I'd plan on keeping a Refresh button close by to allow the user to poll as they wish.

Upvotes: 3

Related Questions