What is the delegate of these NSURLSession methods to Swift?

Xcode does not automatically terminate these methods, I set the delegate to

NSURLSessionTaskDelegate, NSURLSessionDelegate,NSURLSessionDownloadDelegate

but it still doesn't complete, so I feel like setting the wrong delegates, because that is what xcode does when I setting the wrong delegate

URLSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)
URLSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)
URLSession(_:downloadTask:didFinishDownloadingToURL:)

well what happened to quick this time

-2
source share
1 answer

If you type this in the Playground:

class Downloader : NSObject, NSURLSessionTaskDelegate, NSURLSessionDownloadDelegate {

}

and then start typing inside the class URLS, you will get all the autocomplete content. Try this, and if that doesn't work, restart Xcode. Perhaps “cleaning up” the project will also help.

, , , NSURLSessionDownloadDelegate, .

.

+3

All Articles