Apple just introduced async/await and a bunch of Foundation functions that use them. I'm downloading a file using the new async/await pattern, but i cannot seem to get the download progress.
(downloadedURL, response) = try await URLSession.shared.download(for: dataRequest, delegate: self) as (URL, URLResponse)
As you can see, there is a delegate, and i have tried conforming my class to the URLSessionDownloadDelegate and implementing the urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:) function, but it never gets called.
I also tried creating a new URLSession and setting it's delegate to the same class, in hopes that URLSession would call this function instead, but it never gets called and the file still happily downloads. But i need the progress, how do i get it please?
