Skip to content

Repository files navigation

Build Swift 5 License

PausableDownloads-Example

An example project showing how to pause and resume downloads as shown in this post - https://williamboles.com/not-all-downloads-are-born-equal/

In order to run this project, you will need to register with TheCatAPI to get an API key to access TheCatAPI's API (which the project uses to get its example content). Once you have your key, add an xcconfig file called Secrets to the top directory with your key as the value of CAT_API_KEY and the project should now run.

Seeing a download resume

The app is a gallery of cat images that you can swipe through. The downloading of each image starts when you land on it. Swiping away from an image that hasn't finished downloading pauses it; swiping back resumes that download from where it left off rather than starting it again.

If you have a modestly fast internet connection, you will probably struggle to pause a download before it finishes. Use Network Link Conditioner to throttle your connection.

Releases

Packages

Used by

Contributors

Languages