I’m downloading files using NSOperation (s) and adding them NSOperationQueue. NSOperationQueue is getting suspended when app goes in the background. Is there any work around if queue will not suspend in the background and start the next operation?
I’m downloading files using NSOperation (s) and adding them NSOperationQueue . NSOperationQueue is getting
Share
While your queue is running use the
UIApplication beginBackgroundTaskWithExpirationHandlercall to start a background task that will keep your downloads running.I generally wrap up each operation with its own
beginBackgroundTaskWithExpirationHandlercall, and queue the next one up before I callendBackgroundTaskthat way the queue keeps running.note an individual background task is limited to 10 minutes of operation, after that iOS will suspend the app.