Panda Pajama
Panda Pajama

Reputation: 1431

Recurring background task in iOS

I would like to make an app that periodically, sporadically and automatically downloads some data from a list of user-defined sites, so it can then analyze and show historical graphs and other reports based on that data.

If I were to do this in Windows, I'd use the system Task Scheduler; if I were in Unix, I'd use cron; if I were in Android I'd use services. I would like to know how to do it in iOS.

As far as my research goes, this is not trivial in iOS, as there is no public interface for doing this. There are however, some workarounds to get this done:

So, my question is: are there any other ways to do this that I am not aware of? Are there any apps that already do something similar?

Upvotes: 0

Views: 572

Answers (3)

Danyal Aytekin
Danyal Aytekin

Reputation: 4215

I think you have one further option, location based updates, but this depends on your users moving around regularly.

See e.g. http://blog.instapaper.com/post/24293729146 and http://blog.news.me/post/21643399885/introducing-paper-boy-automatically-download-your-news

Upvotes: 1

Eduardo Scoz
Eduardo Scoz

Reputation: 24743

Your only choice in iOS really is to go with server-side infrastructure. Don't be afraid of charging the user; if the service you're providing is really useful, people will pay. I do get that it's a lot of extra work, etc, but it really is the only way.

Newsstand apps can only download data once a day, and they still require s server-side push notification to start the download, so you would have to put some infrastructure in place. More importantly, though, Apple is actually quite strict about being in the newsstand; I've been thru this a few times: you don't necessarily have to be a magazine/periodical, but your app should be primarily used for content distribution.

Upvotes: 1

Daniel
Daniel

Reputation: 9040

Your assessment is correct. Your only 2 options are to host your own service that periodically downloads the data (your second bullet point) or use Newstand. For Newstand, it's possible that your app could fit the definition; it may just depend on how you characterize the app.

Upvotes: 1

Related Questions