I\'m building a iPhone application which depends data from an online database.
To update the data in the app i could check at a certain time interval if an update is ne
Short answer to your first question: You have to poll.
Why :- When your app is in the background, it can not know of any push notifications, unless there is an alert and user clicks View
or Launch
, which is not guaranteed (and you don't want the alert too).
You may also want to avoid using APNS (if its only for this purpose), because of the additional overhead of configuring a server with Apple certificates and all that jazz.
To answer to your second question: How frequent you want your updates really depends on what your app does. For example, if you are showing "Stock" values, you may want to update the data every few seconds. For weather, it may be a few hours. For others, it may be days or even longer. It depends on how critical the updates are for the user.