URLSessionConfiguration httpMaximumConnectionsPerHost not working in iOS 10?

Setting this parameter does not affect the number of simultaneous connections to the host. I found the same issue on the apple developer forum . This looks like a bug in iOS 10, iOS 9 is working correctly.

let sessionConfiguration = URLSessionConfiguration.background(withIdentifier: <identifier>)
    sessionConfiguration.httpMaximumConnectionsPerHost = 4
    sessionConfiguration.allowsCellularAccess = AppDelegate.shared.userDefaults.allowsCellularAccess
    sessionConfiguration.timeoutIntervalForRequest = 7*60
    sessionConfiguration.timeoutIntervalForResource = 24*60*60
    let session = URLSession(configuration: sessionConfiguration, delegate:self, delegateQueue: operationQueue)

      

Does anyone have the same problem? If there is an alternative stable way of managing the queue of many uploads / downloads in the background?

+3
ios10 urlsession nsurlsessionconfiguration


source to share


No one has answered this question yet

Check out similar questions:

22
How to cache using NSURLSession and NSURLCache. Does not work
6
What is the correct way to use backgroundCompletionHandler in Alamofire?
4
Background loading not working in Swift
3
IOS network call prioritization
2
NSURLSessionConfiguration timeoutIntervalForRequest doesn't seem to work with background session
2
NSUserDefaults in iOS10 not working on device
2
sessionWithConfiguration: delegate: delegateQueue: works in simulator but not in device
0
NSURLSession HTTPMaximumConnectionsPerHost is not working as expected
0
URLSession.shared.dataTask doesn't work without .resume ()
0
NSURLSession Does background task stop when home button is pressed?



All Articles
Loading...
X
Show
Funny
Dev
Pics