0
votes

I am in the process of upgrading one of my apps to iOS 7 and thought of trying out the new multitasking apis. I am planning to use Background Fetching or Silent push notifications to keep my content uptodate. Basically set of JSON values. Most of the documentation/code I looked through download videos or images and I have following questions...

  1. If we use Background Fetching or Silent push notifications, do we need to download data using a separate backgroundSessionConfiguration ? Or can we do this by utilizing existing defaultSessionConfiguration ? (Because I can reuse the existing method rather than having a separate method for background downloads).

  2. Is it possible to use background transfers to download large set of data other than file assets ?

  3. As I know background background fetch only allows about 1 minute to complete the task , is it possible to use a background transfer inside the fetch to extend that period ? ( I mean, if we start a background transfer inside that background fetch request does the app execute it and complete the job. Or does run it incrementally like pause it and resume it when the app is woken again).

1

1 Answers

3
votes

NSUrlSession supports background fetching of Files only. That is an important consideration in your design.

1) Yes, you need to create a session configuration for background downloads.

2) Not unless you download the data to a file then read the file

3) Background fetch can also be done incrementally in chunks if you find you are hitting a time limit. Though the time it takes to download usually isn't counted, just your processing of it.