Interface NSURLSessionDownloadDelegate

    • Method Detail

      • URLSessionDownloadTaskDidFinishDownloadingToURL

        void URLSessionDownloadTaskDidFinishDownloadingToURL​(NSURLSession session,
                                                             NSURLSessionDownloadTask downloadTask,
                                                             NSURL location)
        Sent when a download task that has completed a download. The delegate should copy or move the file at the given location to a new location as it will be removed when the delegate message returns. URLSession:task:didCompleteWithError: will still be called.
      • URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes

        default void URLSessionDownloadTaskDidResumeAtOffsetExpectedTotalBytes​(NSURLSession session,
                                                                               NSURLSessionDownloadTask downloadTask,
                                                                               long fileOffset,
                                                                               long expectedTotalBytes)
        Sent when a download has been resumed. If a download failed with an error, the -userInfo dictionary of the error will contain an NSURLSessionDownloadTaskResumeData key, whose value is the resume data.
      • URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite

        default void URLSessionDownloadTaskDidWriteDataTotalBytesWrittenTotalBytesExpectedToWrite​(NSURLSession session,
                                                                                                  NSURLSessionDownloadTask downloadTask,
                                                                                                  long bytesWritten,
                                                                                                  long totalBytesWritten,
                                                                                                  long totalBytesExpectedToWrite)
        Sent periodically to notify the delegate of download progress.