Xamarin-CrossDownloadManager icon indicating copy to clipboard operation
Xamarin-CrossDownloadManager copied to clipboard

unable to download multiple file parallelly xamarin ios plate form

Open vikassharma83021 opened this issue 7 years ago • 6 comments

I am using Xam.Plugins.DownloadManager plugin for file download in both plate form android and ios with xamarin. It is working fine on android plate form but on ios unable to download multiple files parallelly. anyone can help me ?

Expected behavior

I want to download multiple files parallely like in android.

Actual behavior

Now only one file can download at a time and next file downloading starts when previous completed.

Configuration

Platform:

  • [x] iOS

Device:

  • [x] Real device (i phone 7)

vikassharma83021 avatar Jun 23 '18 07:06 vikassharma83021

You can check what happens if increasing this factor:

https://github.com/SimonSimCity/Xamarin-CrossDownloadManager/blob/bd94398623043cd3e29f743201302103d9d48ba1/DownloadManager/Plugin.DownloadManager.iOS/DownloadManagerImplementation.cs#L151-L155

Many sources I find on the internet highly encourage me to leave it at 1, either because the memory-overhead is quite high or because of some compatibility issues. https://robots.thoughtbot.com/a-simple-approach-to-thread-safe-networking-in-ios-apps#extending-urlsession-to-perform-requests-in-parallel

Please try it out and check if it works. If you want me to increase it please include other sources who state what the reason is not to increase it or how it could affect other factors of any kind.

https://stackoverflow.com/questions/39807300/how-does-the-maxconcurrentoperationcount-of-the-nsurlsession-delegatequeue-effec even points to another property which might be good to take ...

SimonSimCity avatar Jun 25 '18 21:06 SimonSimCity

Thanks for reply sir. how can i change configuration.HttpMaximumConnectionsPerHost in my installed package .

vikassharma83021 avatar Jun 29 '18 06:06 vikassharma83021

@vikassharma83021 you can create a fork of this repository, change the sample project so it includes what you want to test and then change the number in the file I showed you. This way you can test what side-effects it will have on your project or if it would work at all. (Some of the reports I found state that this helps nothing ...)

SimonSimCity avatar Jun 29 '18 06:06 SimonSimCity

but after change how can i add this to my project . because last time add this from nuget package manager

vikassharma83021 avatar Jun 29 '18 06:06 vikassharma83021

hello please tell me about this

vikassharma83021 avatar Jun 30 '18 05:06 vikassharma83021

As I'm voluntarily working on this in my spare time I don't always have as much time as a paid support-service, answering every complex question within a guaranteed 24h.

I hope you've already found out about how to fork a project, add the individual projects of the solution of this repository into yours and adding them as reference to your platform-dependent projects.

Once you've done that you can just change the number and recompile the project.

SimonSimCity avatar Sep 24 '18 04:09 SimonSimCity