The CFNetworkHanlder, which can be found here does not use kCFStreamNetworkServiceTypeBackground which means that does not support background sessions. This is an issue, because when an application goes into the background, the application will not perform the downloads.
This issue connects with https://github.com/xamarin/xamarin-macios/pull/5463. In that PR, we are canceling all those requests that are not performed in a background session to ensure that the thread pool from mono does not hang the application. This can be done because, if a developer has issues with the cancelation, we can state that he should be using a background session. The same cannot be said about the CFNetworkHandler, because, if we cancel the requests, we have not correct alternative to be given to the developer.
This issue will imply two different pieces of work
I'm creating the issue to start a discussion, because:
I am personally inclined in not working on the issue. Have it here so that developers can find it, and if we have many requests, work on it.
@chamons @spouliot @rolfbjarne comments are welcome :)
I think that since CFNetwork is obsolete, there's no need to implement any new behavior.
I don't have much appetite to change CFNetwork for fear of breaking existing apps.
Leaving this open as long as CFNetwork is a supported option may be useful in case people run into this, we can point them here.
Most helpful comment
I think that since CFNetwork is obsolete, there's no need to implement any new behavior.