Created
May 11, 2017 09:47
-
-
Save chriswebb09/dae821bb48dc513fd603f36a78c7632b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension iTunesAPIClient: URLSessionDelegate { | |
| internal func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { | |
| // Calls background session completion in AppDelegate | |
| } | |
| internal func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64,totalBytesExpectedToWrite: Int64) { | |
| // Gives you the URLSessionDownloadTask that is being executed | |
| // along with the total file length - totalBytesExpectedToWrite | |
| // and the current amount of data that has received up to this point - totalBytesWritten | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment