iosbackground-fetch

Is iOS Background fetch triggered only in background mode?


I am working on the iOS app, that needs periodic downloads from the server both in active and background mode. I know that for the Background mode there is a possibility to use Background Fetch functionality. However, I did not find if Background Fetch works in active mode as well. Can some body tell me if it does work?

Or if it doesn't, what is the best solution to get some data periodically on iOS app (basically indefinitely until the app is terminated)?


Solution

  • The way to achieve what you want to do is by using background fetches. (as you are doing).

    As the apple documentation saids:

    The system wakes the app at opportunistic moments to begin downloading new content.

    That means that your app doesn't needs to be in background mode, it will be waked up.

    This method will run over arbitrary intervals, depending on how well your app behaves in terms time consumption and energy usage.