WebDAV Swift is a Swift library for communicating with WebDAV servers such as Nextcloud.
Version 2.2.0 has released which brings it to a point where I feel like it is ready to be shared.
- Create, read, update, and delete files
- Image thumbnail fetching from Nextcloud servers
- Multi-level memory and disk cache for images and thumbnails
- Multiple account support
- Swift Package Manager support
WebDAV servers such as Nextcloud are great ways of hosting your own personal cloud storage. I’ve been using Nextcloud for years and have had several ideas for apps I’d like to make integrating with it. I originally tried using the library amosavian/FileProvider but had several issues with it. The first of which was a lack of support for getting thumbnails from Nextcloud. I figured out how to generate thumbnails using the Nextcloud API, and since FileProvider was open-source, I added that feature as a contribution to the library. I still wasn’t quite satisfied for various other reasons, however, and decided to make my own library.
Another issue I had with previous WebDAV libraries is the lack of support for using multiple accounts. The library I created uses ephemeral URL Sessions to allow for use of multiple accounts without needed to worry about credential caching or profile switching. It also supports image downloading and caching using 3lvis/Networking, though I plan to implement an in-house caching solution in the future with some added features.