Marco Eidinger
Swifty Tech by Marco Eidinger

Swifty Tech by Marco Eidinger

The best registries for your Swift Package

The best registries for your Swift Package

Let people easily discover your work with Swift Package Registry, Swift Package Index or Swiftpack.co

Marco Eidinger's photo
Marco Eidinger
·Dec 29, 2021·

4 min read

Subscribe to my newsletter and never miss my upcoming articles

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

  1. Swift Package Registry
  2. Swift Package Index
  3. 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.

Start site of Swift Package Registry

You can access the Swift Package Registry via swiftpackageregistry.com.

Here is an example of package information shown by this registry.

Alamofire package shown on Swift Package 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.

Swift Package Registry is open-source

It is easy to add a package to the registry.

Adding a package to Swift Package 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.

Start site of Swift Package Index

You can access the Swift Package Index via swiftpackageindex.com.

Here is an example of package information shown by this registry.

Alamofire package shown on Swift Package Index

The project is open-source and written in Swift using Vapor.

Swift Package Index is open-source

Basic Git / GitHub experience is needed to add a package to the registry.

Adding a package to Swift Package Index

Notable features are

  • advanced search capabilities Advanced Search Capabilities
  • automatically creates a Package Collection Package Collection Support
  • the ability to generate playground files with the dependency already inserted, ready to open with Xcode. spi_playground.png
  • Publishing package updates through a Twitter account sp_updatesviatwitter.png

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

Start site of Swiftpack

You can access Swiftpack via swiftpack.co.

Here is an example of package information shown by this registry.

Alamofire package shown on Swift Pack

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.

Adding a package to Swift Pack

You can easily search/find all packages for an author, but Package Collections are not supported.

Packages listed by authors on Swift Pack

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

Criteriaswiftpackageregistry.comswiftpackageindex.comswiftpack.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 packageA-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.

Did you find this article valuable?

Support Marco Eidinger by becoming a sponsor. Any amount is appreciated!

See recent sponsors Learn more about Hashnode Sponsors
 
Share this