tags:

views:

27

answers:

1

I want my app to poll server for updates and download them when the app is running in the background. How can I achieve this. Can anybody tell me where to start from?

Any help would be appreciated.

+1  A: 

Generally, Apple wants you to use push, not pull, because it conserves battery life. However, if you want to go with the polling, there are some things to look into. The Apple Documentation describes background tasks in depth here. (Note that you may need to be a registered developer to see it. It sounds like you already are though.) Particularly, you want to use these methods:

  • applicationWillResignActive:

  • applicationDidEnterBackground:

  • applicationWillEnterForeground:

  • beginBackgroundTaskWithExpirationHandler:

Moshe