iOS timed background processing

I don’t have a definite answer for your question, just a rambling set of comments that may help you decide what will work best for your situation. Sorry, this is the best I can offer.

One thing to keep in mind is that an app shouldn’t use any of the phone’s data-plan quota without letting the user know it’s downloading something. Some apps are all about downloading stuff such as Twitter clients, so the nature of the app tells the user the app is using the data plan. Other apps, like a drawing program, have little explicit need for downloading, so should notify the user of a need for a download.

Because Apple doesn’t allow developers the option of downloading in the background, people using iOS are trained to wait for their apps to download updated data. The typical way to improve the user experience while waiting for a download is to at a minimum show a spinner, letting the user know the app is working. To improve the interface even more, send the download to another thread, and allow the people to continue to use the rest of the app. They can interact with the old data, or use the parts of the app that are not in need of an update.

Apple doesn’t give programmers a mechanism to download new content in the background for most app types. According to Apple’s announcements, iOS 5’s Newsstand feature will allow subscriptions to be updated in the background. Maybe in the future we developers will have more options for background downloading.

I have one app on the app store that uses method 5, and another in the works that uses method 3.

I’d use push notifications (method 1) if the people would want to know as soon as possible that new data is available. It would depend upon the topic.

iOS doesn’t have anything like Android’s service (method 2)

I have an app that checks an RSS feed for news each time the app is launched (method 3). This app mostly does other things, but shows the feed on the starting view. Since the app is a simple utility that helps people find a specific solution, the RSS feed is ancillary.

I like the timer idea in method 4. If you want to give the person a chance to approve the download, the timer could pop up an alert view, and then wait. That way the app doesn’t actually download something if the device was just left sitting with your app in the foreground.

My implementation of method 5 in my currently available app has a little variation. It downloads the data for just one of many views. Each time this view is visited it checks against the stored time to see if it should download fresh data. Then it asks for permission.

Leave a Comment