Created
May 11, 2017 09:49
-
-
Save chriswebb09/40b87c40fdb0890c11c2f822cabcc844 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) { | |
if let appDelegate = UIApplication.shared.delegate as? AppDelegate, | |
let completionHandler = appDelegate.backgroundSessionCompletionHandler { | |
appDelegate.backgroundSessionCompletionHandler = nil | |
DispatchQueue.main.async { | |
completionHandler() | |
} | |
} | |
} | |
// Other networking functionality | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment