Swiftpack.co -  Ranchero-Software/RSWeb as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Ranchero-Software/RSWeb
Utility code for downloading things from the web. Mac and iOS.
.package(url: "https://github.com/Ranchero-Software/RSWeb.git", from: "1.0.2")

RSWeb

RSWeb is utility code — all Swift — for downloading things from the web. It builds a Mac framework and an iOS framework.

Easy way

See OneShotDownload for a top-level download function that takes a URL and a callback. The callback takes Data, URLResponse, and Error parameters. It’s easy.

Slightly less easy way

See DownloadSession and DownloadSessionDelegate for when you’re doing a bunch of downloads and you need to track progress.

Extras

HTTPConditionalGetInfo helps with supporting conditional GET, for when you’re downloading things that may not have changed. See HTTP Conditional Get for RSS Hackers for more about conditional GET. This is especially critical when polling for changes, such as with an RSS reader.

MimeType could use expansion, but is useful for some cases right now.

MacWebBrowser makes it easy to open a URL in the default browser. You can specify whether or not to open in background.

GitHub

link
Stars: 16
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

51 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API