BottleRocketStudios / iOS-Hyperspace

An extremely lightweight wrapper around URLSession to make working with APIs a breeze.
Apache License 2.0
47 stars 17 forks source link

Show a progress indicator for downloads #116

Open earlgaspard opened 4 years ago

earlgaspard commented 4 years ago

Have a way for Hyperspace to show a progress indicator or inform about current progress status. Not sure if this is already in there.

tylermilner commented 4 years ago

I think this can currently be achieved by manually observing the URLSessionDelegate protocol and then injecting the corresponding URLSession into the Hyperspace NetworkService object that's used to execute requests. See this article for more information.

However, I do agree that we should look into adding this functionality to Hyperspace so that you can track progress if you just use the defaults.

wmcginty commented 2 years ago

This may be simpler to add if/when we fully adopt structured concurrency (#159) using URLSessionTaskDelegate (https://developer.apple.com/documentation/foundation/urlsessiontaskdelegate).