1

I am looking for ways where my RESTful web service can let my iPad app know to update its cached data when the server's data has been updated. The server is running on Tomcat & Apache Jersey.

Is this doable? And not using Apple Push Notification (APN)?

John Topley
  • 113,588
  • 46
  • 195
  • 237
PLui
  • 765
  • 1
  • 10
  • 27

4 Answers4

1

There are essentially two options: heartbeat check from the app to the server (on a timer) or something that keeps the line of communication open, such as web sockets. Here is an open source web socket for iOS, but I have not personally experimented with it:

http://code.google.com/p/unitt/wiki/UnittWebSocketClient

Prometheus
  • 870
  • 1
  • 8
  • 14
  • Thanks for your input! I wish I could upvote the answer but I don't have enough reputation yet... – PLui Feb 14 '12 at 17:02
0

I'm not sure why you want to avoid APN, but this really sounds like what it's made for.

If you want to update only when your app is running, there are other options (straight forward polling comes to mind), but if you want the user to be notified even when the application isn't running, there isn't really any other Apple approved way to do it.

Joachim Isaksson
  • 176,943
  • 25
  • 281
  • 294
  • Yeah, I would have wanted to use APN too but it's a design decision that's not made by me...the belief is that we don't want to rely on Apple's servers to be up in order for the push mechanism to work... – PLui Feb 14 '12 at 17:03
0

Can reverse the design around and make your device a client and pull data from a REST service at a regular interval?? With all the support one gets from REST, it might be helpful to know you will have complete control of when data is being pulled by the device from server and exactly the data that might goto device.

I'm curious to know your thoughts, Thanks.

sathish_at_madison
  • 823
  • 11
  • 34
  • I think if push is not possible then we will have to go with the poll approach. Again, the design decision wasn't made by me but the belief is that there will be a lot of wasted network traffic if we regularly poll. – PLui Feb 14 '12 at 17:06
-1

I'll be building a web-syncing iOS application soon, and we're going to use RestKit. Take a look, it might be a big help.

bryanjclark
  • 6,247
  • 2
  • 35
  • 68