I’m trying to download a series of files from server to iOS app, with the intent that the download of these files happen even when the App is in the background mode.
I'm using background transfer provided by NSURLSession and its series of APIs.
I initiated download task when app was running in foreground mode and it gave me expected result as series of download was working good but if I press the home button when series of download is in progress then it will stop immediately and when I go into the app again download shall resume.
If say it in simple words background transfer isn’t even working me.
EDIT
Initially I was testing this in simulator it didn’t work well and someone commented to test the same in real device, so I tested it by connecting real device in debug mode it really worked well and I thought everything was solved but again it gave me a shock that is if I disconnect the device from Xcode and check app, it did not work at all :(
I created a sample application to demonstrate this issue, please download it from here
Note: In this sample application I reinitiated download call in the didFinishDownloadingToURL to simulate series of download files
Can you anyone please help me to solve this?