NSURLSession sessionWithConfiguration hangs

Very similar to the issue described here: sessionWithConfiguration freezing iOS 8 iPhone 4S on new Xcode 6.0.1

I have an NSURLSession that I am creating using the backgroundConfigurationWithIdentifier: method (in ios8).

If I create several hundred downloads, the application suddenly freezes on [NSURLSession* invalidateAndCancel]

either on or onNSURLSession *session = [NSURLSession sessionWithConfiguration:backgroundConfiguration];

If I restart the device it goes away. This can only be repeated if I order a few hundred downloads and then send a message " invalidateAndCancel

". UPDATE . If I only focus on a few downloads per session, it works. It looks like NSURLSession cannot handle a lot of queued tasks even when you provide your own NSOperationQueue.

+3


source to share





All Articles