SimonSimCity / Xamarin-CrossDownloadManager

A cross platform download manager for Xamarin
MIT License
149 stars 68 forks source link

Warning CS0618 Obsolete function overload NSUrlSession.FromConfiguration #97

Open runesig opened 6 years ago

runesig commented 6 years ago

When I am trying to compile this for iOS I get a warning:

Warning CS0618: 'NSUrlSession.FromConfiguration(NSUrlSessionConfiguration, NSUrlSession Delegate, NSOperationQueue)' is obsolete: 'Use the overload with a 'INSUrlSessionDelegate' parameter.'

The issue is in the file DownloadManagerImplementation.cs for iOS and the function is "createSession":

    private NSUrlSession createSession(NSUrlSessionConfiguration configuration, UrlSessionDownloadDelegate sessionDownloadDelegate) {
        configuration.HttpMaximumConnectionsPerHost = 1;

        return NSUrlSession.FromConfiguration(configuration, sessionDownloadDelegate, null);
    }

Platform:

SimonSimCity commented 6 years ago

@runesig would you have the time to write a PR for this? 😊