Search code examples
iosxamarinfetchbackground-process

Is uploading allowed in background fetch (PerformFetch)


I'm using C# (Xamarin) on iOS, but I suspect this question applies to those programming in Objective C as well. iOS 7 introduces the background "fetch" functionality which lets the app download data while it is in the background.

All of the docs I've read (on both Xamarin's and Apple's sites) state that this functionality is for downloading updates, and that you have around 30 seconds to finish the download; however, nowhere are restrictions stated. I'm wondering if it's acceptable for my app to also upload things to our servers when in the background.


Solution

  • Yes!

    Sorry for the short answer. I have implemented fetch in one of my apps available in AppStore where I upload or download a very small txt file. You are right about 30 sec window. So far its been working fine with no problems.

    You can even simulate fetch upload and download in your XCode simulator to see if you run into any time limit problem.

    Again the point of fetch is to keep your upload / download data light and you already know that you cannot control how frequent fetch wakes up to do those action. It maybe every 10 mins or once a day depending upon users internet usage pattern.