Tomasz Szkudlarek
Tomasz Szkudlarek

Reputation: 150

Is it possible to use Background Fetch (or any other iOS mechanism) to download some files at specified interval?

I have very basic knowledge of iOS programming, though, i understand some concepts and limits (and I'am an experienced programmer on other platforms).

I was asked to prepare a project, which would require an iOS app to download some basic office files (whenever they are available) and keep them in local iPad storage, so they are accessible offline. For the sake of simplicity let's say, they are published on some kind of web servers. And it should work over 3G.

Now, i understand, that first way to keep data (files) up do date is to simply synchronize them whenever user opens the app and has an access to the network (internet).

It becomes more complicated when i will need in addition to try to keep them synced while the app is not running / ipad/iphone simply lays on the table.

Is it possible to use f.e. "Background Fetch" (or any other mechanism) to download files in background? I know about 30 second window (this should be enough, or - if it must be enough, then i can adapt synchronized files sizes to make it possible). I don't need to have strict intervals, they would be nice, though.

I understand, that when files are stored locally, it's not a rocket science to open them in any installed apps (like to open Excel files in installed Numbers)?

Another idea (instead of an app) would be simply to use special mailbox (we use Exchange 2010) where such documents would be stored and eventually organized in folders (iPad mail app supports this, so it would not be very bad). This way, synrchonization would be performed immediatelly. The question is what happens to attachements - i believe they are not downloaded before user opens an email?

Eventually any other ideas/concepts to realise such a task?

Upvotes: 0

Views: 110

Answers (1)

Steve
Steve

Reputation: 1840

Look at the documentation for silent push notifications and for Background Transfer Service. You can send a silent push notification to the app alerting it that there are files to be downloaded. This can wake your app in the background and allow it to kick off a Background Transfer to download the newly-available files.

Also have a look at the WWDC 2013 Video entitled "What's New With Multitasking", Session 204 from WWDC (https://developer.apple.com/wwdc/videos/).

Upvotes: 1

Related Questions