The best registries for your Swift Package

Marco Eidinger
Geek Culture
Published in
4 min readJan 6, 2022
Let’s meet Swift Package Registry, Swift Package Index and 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

  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.

Instructions to add a package to the Swift Package Index

Notable features are

  • advanced search capabilities
Advanced Search Capabilities through filters
  • automatically creates a Package Collection
Out-of-the-box Package Collection Support
  • the ability to generate playground files with the dependency already inserted, ready to open with Xcode.
Try out a Swift Package
A tweet for each new releases and package

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 Swiftpack

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 Swiftpack is rarely needed

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

Packages listed by authors on Swiftpack

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.

Detailed Comparison

Feature Set Comparison

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.

Originally published at https://blog.eidinger.info.

--

--

Marco Eidinger
Geek Culture

Software Engineer open-source and enterprise mobile SDKs for iOS and macOS developers | @MarcoEidinger on Twitter | visit blog.eidinger.info