Using the Combine URLSessionTask Publisher, is there a way to still access a reference to the URLSessionTask to set a delegate?
What I'm trying to do is collect network metrics by handling the delegate calls of URLSession did finish collecting metrics.
What I'm trying to do is collect network metrics by handling the delegate calls of URLSession did finish collecting metrics.
I don’t think so. However, I’m not sure of the utility of this. In most cases you use taskDescription to map from the task to some other state you’re tracking, and the closures you hang off the publisher chain can just capture that state directly.However, the question is still sort of valid for things like setting
the taskDescription.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"