Im downloading video files of 50-60MB[Around 40-50] in Background using NSURLSession.Sometimes I am getting a Low memory message and app crashes and I cannot access any applications.Is there a way to handle this issue?
Asked
Active
Viewed 208 times
1
-
Is there any reason why you have to download that many at once? Can you just queue them and load say 3 at a time? – JanR May 22 '14 at 05:12
-
I have tried that also but doing that sometimes it seems that download get stopped.I have seen the issue in Apple's developer forum. – Jacob Davis Cherussery May 22 '14 at 05:17
-
[link](https://devforums.apple.com/thread/223472?tstart=0).This is the link to the discussion. – Jacob Davis Cherussery May 22 '14 at 05:18
-
One issue i foresee with this strategy is that you are severly hammering mobile bandwidth, and if people have a monthly data cap they will hit it in one go. What is your app about? Why not only download content as is needed? – JanR May 22 '14 at 05:19
-
It is a specific requirement so that only if user selects an option this download will be activated and it is also available in Wi-Fi mode only. – Jacob Davis Cherussery May 22 '14 at 05:21
-
you could create events that when a download is complete it will instantiate the next? That way you keep the connection alive, and you can control the flow of content. You could store it all in an array or something to effectively create a queue of sorts – JanR May 22 '14 at 05:23
-
Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/54171/discussion-between-sam-and-janr). – Jacob Davis Cherussery May 22 '14 at 05:23