The best registries for your Swift Package
Let people easily discover your work with Swift Package Registry, Swift Package Index or Swiftpack.co
As a Swift developer, you want people to discover your Swift Packages quickly. It is understandable if you struggle to find an answer for the how. The Swift Package Manager is a beautiful tool for managing the distribution of Swift code. Itβs integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. But at the end of the day, it is just a package manager.
There is no de-facto standard for a package registry related to Swift packages. Private and community projects are trying to fill the void for easier searching and discoverability of Swift Packages.
This blog post will
- give you an overview of the three most popular registries for Swift Packages out there (as of December 2021)
- compare their feature set and
- provide recommendations for package authors and users which one to use
The three most popular registries ordered based on the time I discovered them over time are
- Swift Package Registry
- Swift Package Index
- Swiftpack
Swift Package Registry
Since the GitHub Swift Package Registry is not currently released and the IBM Swift Package Catalog is has been killed, the Swift Package Registry fills the current gap for easier searching and discoverability of Swift Packages.
You can access the Swift Package Registry via swiftpackageregistry.com.
Here is an example of package information shown by this registry.
The project is open-source and this GitHub App is a Node.js application built with Probot. It parses all Swift packages using Docker.
It is easy to add a package to the registry.
My personal opinion: this registry was the first to add my Swift Packages. I was impressed by the GitHub integration through its GitHub app. The project has my deep most respect β but the features are lacking compared to the other registries.
Swift Package Index
The Swift Package Index helps you make better decisions about the dependencies you use in your apps.
You can access the Swift Package Index via swiftpackageindex.com.
Here is an example of package information shown by this registry.
The project is open-source and written in Swift using Vapor.
Basic Git / GitHub experience is needed to add a package to the registry.
Notable features are
- advanced search capabilities
- automatically creates a Package Collection
- the ability to generate playground files with the dependency already inserted, ready to open with Xcode.
- Publishing package updates through a Twitter account
My personal opinion: this registry seems to be the most active one and therefore it is no surprise it has the most features. πππ
Swiftpack
We do our best to crawl github for new packages
You can access Swiftpack via swiftpack.co.
Here is an example of package information shown by this registry.
The project is closed-code.
This registry lists the most packages as it automatically crawls GitHub for new packages.
You can also register a package manually.
You can easily search/find all packages for an author, but Package Collections are not supported.
Swiftpack also publishes package updates through a Twitter account
My personal opinion: this registry appears to be maintained by a single person. Therefore it is especially incredible that this registry has the unique feature of automatically crawling and adding a Swift Package to the registry πππ It is questionable if this registry can catch up with the feature richness of the Swift Package Index, considering it is a single-person project with no outside contributions.
Comparison
Criteria | swiftpackageregistry.com | swiftpackageindex.com | swiftpack.co |
Number of Packages | ~ 5 k | ~ 4k | ~ 11.5k |
Shows Popular Packages | β | β | β |
Shows Recently Added Packages | β | β | β |
Shows Recent Releases | β | β | β |
Shows Related Packages | β | β | β |
Compatibility Report | β | β | β |
Playground Support | β | β | β |
Advanced filter search | β | β | β |
Registry API Support | β | β | β |
Twitter updates for packages | β | β | β |
Search by author | β | β | β |
Support of Package Collection | β | β | β |
Is Open-Source project | β | β | β |
Easiness to add a new package | A- | B- | A |
Recommendation
As package author I recommend to make sure that your package is added in all of those registries.
As package consumer I primarily use Swift Package Index due to its feature richness.